Calculate the operating cash flow to sales ratio, a liquidity ratio that measures the ability of a company to generate cash from its sales.

The operating cash flow to sales ratio is calculated by dividing operating cash flow by sales revenue. It indicates the proportion of sales revenue that is converted into cash from operating activities.

The formula is as follows:

\[\text{Operating Cash Flow to Sales Ratio} = \text{Cash Flow from Operations} / \text{Revenue}\]

Also known as: cash flow to sales ratio.

Operating Cash Flow Sales Ratio in Python

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_operating_cash_flow_sales_ratio as shown below.

from financetoolkit import Toolkit

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

operating_cash_flow_sales_ratios = toolkit.ratios.get_operating_cash_flow_sales_ratio()

Which returns:

  2021 2022 2023 2024 2025
AAPL 0.2844 0.3098 0.2884 0.3024 0.2679
TSLA 0.2136 0.1807 0.137 0.1528 0.1555

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