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

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_working_capital as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")

working_capitals = toolkit.ratios.get_working_capital()

Which returns:

  2021 2022 2023 2024 2025
AAPL 9.355e+09 -1.8577e+10 -1.742e+09 -2.3405e+10 -1.7674e+10
TSLA 7.395e+09 1.4208e+10 2.0868e+10 2.9539e+10 3.6928e+10

Parameters

The function accepts the following parameters:

  • rounding (int, optional): The number of decimals to round the results to. Defaults to 4.
  • growth (bool, optional): Whether to calculate the growth of the ratios. Defaults to False.
  • lag (int | str, optional): The lag to use for the growth calculation. Defaults to 1.
  • standardize (bool, optional): Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.
  • trailing (int): Defines whether to select a trailing period. E.g. when selecting 4 with quarterly data, the TTM is calculated.
Share