Calculate the cash ratio, a liquidity ratio that measures a company’s ability to pay off its short-term liabilities with its cash and cash equivalents.

The cash ratio is calculated by dividing the sum of cash and cash equivalents by current liabilities. It provides insight into a company’s immediate ability to cover its short-term obligations using its most liquid assets.

The formula is as follows:

\[\text{Cash Ratio} = (\text{Cash and Cash Equivalents} + \text{Short Term Investments}) / \text{Current Liabilities}\]

Also known as: most conservative liquidity ratio.

Cash Ratio in Python

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_cash_ratio as shown below.

from financetoolkit import Toolkit

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

cash_ratios = toolkit.ratios.get_cash_ratio()

Which returns:

  2021 2022 2023 2024 2025
AAPL 0.4992 0.3137 0.4236 0.3695 0.3302
TSLA 0.8986 0.8306 1.012 1.2686 1.3893

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