Working Capital
Calculate the working capital, which is the difference between a company’s current assets and current liabilities.
The working capital is calculated by subtracting total current liabilities from total current assets. It represents the company’s short-term financial health and its ability to cover its current obligations using its liquid assets.
The formula is as follows:
\[\text{Working Capital} = \text{Current Assets} - \text{Current Liabilities}\]Also known as: net current assets, operating liquidity.
Working Capital in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_working_capital as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["TXN", "QCOM", "ADI"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.ratios.get_working_capital()
Or, after setting up the Finance Toolkit MCP, ask:
How much working capital did Texas Instruments, Qualcomm and Analog Devices hold from 2021 to 2025?
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| ADI | 2.608e+09 | 2.49534e+09 | 1.18305e+09 | 2.49637e+09 | 3.86226e+09 |
| QCOM | 8.124e+09 | 8.858e+09 | 1.2836e+10 | 1.4727e+10 | 1.661e+10 |
| TXN | 1.1116e+10 | 1.1036e+10 | 1.1802e+10 | 1.1383e+10 | 1.0591e+10 |
Parameters
get_working_capital accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the ratios. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
compound | bool | Whether the growth is the compound annual growth rate over the lag (e.g. lag=5 for the five-year CAGR) instead of the total change. Defaults to False. | False |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
trailing | int | The number of periods to sum flows (income and cash flow statement items) over, with balance sheet items averaged over the same number of period ends. E.g. 4 with quarterly data gives the trailing twelve months (TTM) and 3 with annual data a three-year cumulative figure. Defaults to None, which uses single-period flows (per quarter and not annualized with quarterly data). | 4 |