All Profitability Ratios
Calculates and collects all Profitability Ratios based on the provided data.
All Profitability Ratios in Python
collect_profitability_ratios is part of the Ratios module of the open-source Finance Toolkit. Install it with:
pip install financetoolkit -U
Then call collect_profitability_ratios as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")
profitability_ratios = toolkit.ratios.collect_profitability_ratios()
profitability_ratios.loc['AAPL']
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| Return on Invested Capital | 0.5637 | 0.599 | 0.6068 | 0.6019 | 0.7038 |
| Return on Capital Employed | 0.496 | 0.6139 | 0.5677 | 0.6548 | 0.6855 |
| Return on Tangible Assets | 0.155 | 0.1543 | 0.1495 | 0.1425 | 0.17 |
| Income Quality Ratio | 1.0988 | 1.2239 | 1.1397 | 1.2616 | 0.9953 |
| Net Income per EBT | 0.867 | 0.838 | 0.8528 | 0.7591 | 0.8439 |
| Free Cash Flow to Operating Cash Flow Ratio | 0.8935 | 0.9123 | 0.9009 | 0.9201 | 0.8859 |
| EBT to EBIT Ratio | 0.9764 | 0.976 | 0.9666 | 1 | 1 |
| EBIT to Revenue | 0.3058 | 0.3095 | 0.307 | 0.3158 | 0.3189 |
| Cash Tax Rate | 0.2324 | 0.1643 | 0.1642 | 0.2114 | 0.3267 |
| Tax Rate Divergence | 0.0994 | 0.0023 | 0.017 | -0.0295 | 0.1706 |
Parameters
collect_profitability_ratios 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.