Return on Equity (RoE)
Calculate the return on equity (ROE), a profitability ratio that measures how efficiently a company generates profits using its shareholders’ equity.
The return on equity is calculated by dividing the net income by the average shareholders’ equity. Shareholders’ equity represents the residual interest in the assets of a company after deducting liabilities. Note that it is false to take the total equity at the end of the period, given that an income statement reports over the period whereas a balance sheet reports at a point in time; the average equity over the period is used instead.
ROE provides insight into the company’s ability to generate profits from the investments made by its shareholders. A higher ROE indicates that the company is using its equity effectively to generate higher returns for its shareholders.
The formula is as follows:
\[\text{Return on Equity} = \text{Net Income} / \text{Average Shareholders' Equity} (\text{or Total Equity})\]ROE is usually read through the DuPont analysis (Toolkit.models.get_dupont_analysis), which splits it into net margin, asset turnover and the equity multiplier, because the same ROE can come from high margins or from a thin equity base. Large buybacks and accumulated losses shrink equity and can push ROE to extreme or negative values (well above 1 for heavy buyers of their own shares), in which case ROIC or ROA says more. For banks and insurers ROE is set against the cost of equity, and together with the price-to-book ratio it explains much of their valuation.
Also known as: ROE, shareholders equity return, equity profitability.
Return on Equity (RoE) in Python or via the MCP
Install the Finance Toolkit with:
pip install financetoolkit -U
Then call get_return_on_equity as shown below.
from financetoolkit import Toolkit
toolkit = Toolkit(
["JPM", "GS", "MS"],
api_key="FINANCIAL_MODELING_PREP_KEY",
start_date="2021-01-01",
end_date="2025-12-31",
)
toolkit.ratios.get_return_on_equity()
Or, after setting up the Finance Toolkit MCP, ask:
How did the return on equity of JPMorgan Chase, Goldman Sachs and Morgan Stanley compare from 2021 to 2025?
Which returns:
| 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|
| GS | 0.2055 | 0.0948 | 0.0676 | 0.1132 | 0.132 |
| JPM | 0.1622 | 0.1224 | 0.154 | 0.1691 | 0.1575 |
| MS | 0.1389 | 0.1014 | 0.0848 | 0.1246 | 0.149 |
Parameters
get_return_on_equity accepts the following parameters.
| Parameter | Type | Description | Example |
|---|---|---|---|
rounding | int | None | The number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise). | 2 |
growth | bool | Whether to calculate the growth of the ratios. Defaults to False. | True |
lag | int | list[int] | The lag to use for the growth calculation. Defaults to 1. | 4 |
compound | bool | Whether the growth is the compound annual growth rate over the lag (e.g. lag=5 for the five-year CAGR) instead of the total change. Defaults to False. | False |
standardize | bool | Whether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False. | True |
trailing | int | The number of periods to sum flows (income and cash flow statement items) over, with balance sheet items averaged over the same number of period ends. E.g. 4 with quarterly data gives the trailing twelve months (TTM) and 3 with annual data a three-year cumulative figure. Defaults to None, which uses single-period flows (per quarter and not annualized with quarterly data). | 4 |