Calculate the price to cash flow ratio, a valuation ratio that compares a company’s market price to its operating cash flow per share.

The price to cash flow ratio is a key valuation metric that helps investors assess the relative value of a company’s stock. It is similar to the price to earnings ratio, but uses cash flow instead of earnings in the denominator.

The formula is as follows:

\[\text{Price to Cash Flow Ratio} = \text{Share Price} / \text{Cash Flow from Operations per Share}\]

Also known as: P/CF ratio.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Price to Cash Flow Ratio (P/CF) for you. Just ask in plain English.

Calculate the Price to Cash Flow Ratio (P/CF) in Python

The Price to Cash Flow Ratio (P/CF) is available in the Ratios module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_price_to_cash_flow_ratio as shown below.

from financetoolkit import Toolkit

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

price_to_cash_flow_ratio = toolkit.ratios.get_price_to_cash_flow_ratio()

Which returns:

  2021 2022 2023 2024 2025
AAPL 28.7847 17.3655 27.5403 32.6289 36.5905
TSLA 103.745 29.0716 65.2832 94.6614 107.589

Parameters

get_price_to_cash_flow_ratio accepts the following parameters:

  • show_daily (bool, optional): Whether to show daily data. Defaults to False.
  • diluted (bool, optional): Whether to use diluted shares in the calculation. Defaults to True.
  • 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.

The Ratios module page introduces the module, and the sidebar lists all of its functions.

Share