Forward Price to Earnings Ratio (Forward PE)
Calculate the forward price earnings ratio (forward P/E), a valuation ratio that compares the current stock price to the analyst consensus (average) EPS estimate for a future period, instead of the trailing EPS used by the regular P/E ratio.
The formula is as follows:
Forward P/E = Stock Price / Estimated EPS Average
Note that this requires an api_key to be set on the Toolkit and a Premium FMP subscription. Analyst estimates are fetched once per Toolkit instance and cached across calls to this (or the other forward-looking ratio) method - never on initialization or on any other ratio.
Also known as: forward P/E, projected P/E.
Forward Price to Earnings Ratio (Forward PE) in Python
get_forward_price_earnings_ratio is part of the Ratios module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_forward_price_earnings_ratio as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "MSFT"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.ratios.get_forward_price_earnings_ratio()
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| AAPL | 56.1094 | 51.5965 | 48.7491 | 46.9062 | 42.6259 |
| MSFT | 49.0076 | 41.0618 | 39.5875 | 31.2615 | 28.3729 |
Parameters
get_forward_price_earnings_ratio 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.