Graham Number
Calculate the Graham Number, a conservative estimate of a stock’s fair value based on its earnings and book value, as devised by Benjamin Graham.
The Graham Number is intended as an upper bound on the price a defensive investor should pay for a stock. It is most meaningful for stable, profitable companies with positive book value - for companies with negative earnings or negative book value the result is not meaningful (the square root of a negative number is undefined and will show up as NaN).
The formula is as follows:
\[\text{Graham Number} = \sqrt{22.5 x \text{Earnings per Share} x \text{Book Value per Share}}\]Also known as: Graham fair value.
No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Graham Number for you. Just ask in plain English.
Calculate the Graham Number in Python
The Graham Number is available in the Models module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call get_graham_number as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
toolkit.models.get_graham_number()
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| AAPL | 21.7378 | 20.662 | 23.2901 | 22.4927 | 28.7292 |
| TSLA | 18.1054 | 32.3757 | 41.7451 | 30.9185 | 23.7345 |
Parameters
get_graham_number accepts the following parameters:
- diluted (bool, optional): Whether to use diluted shares in the calculation. Defaults to True.
- trailing (int | None, optional): The trailing period to use for the calculation. Defaults to None.
- 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 values. Defaults to False.
- lag (int | list[int], 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.
Related Models
The Models module page introduces the module, and the sidebar lists all of its functions.