Calculate the earnings per share (EPS), a valuation ratio that measures the amount of net income earned per share of outstanding common stock.

The earnings per share (EPS) is a widely used financial metric that helps investors understand the profitability of a company on a per-share basis. It provides insight into the portion of a company’s earnings that is allocated to each outstanding share of its common stock. EPS is an important measure for investors and analysts when assessing a company’s financial performance and comparing it to other companies.

The formula is as follows:

\[\text{Earnings per Share} (\text{EPS}) = (\text{Net Income} - | \text{Preferred Dividends Paid} |) / \text{Weighted Average} (\text{Diluted}) \text{Shares}\]

The preferred dividends are only deducted when include_dividends is True; with the default, EPS is net income divided by the weighted average (diluted) shares.

Also known as: EPS, net income per share.

Earnings per Share (EPS) in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_earnings_per_share as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["V", "MA", "AXP"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.ratios.get_earnings_per_share()

Or, after setting up the Finance Toolkit MCP, ask:

What were the diluted earnings per share of Visa, Mastercard and American Express from 2021 to 2025?

Which returns:

  2021 2022 2023 2024 2025
AXP 10.0215 9.8404 11.212 14.0182 15.375
MA 8.7571 10.2266 11.834 13.8878 16.6682
V 5.6266 7.0023 8.2844 9.7304 10.0982

Parameters

get_earnings_per_share accepts the following parameters.

ParameterTypeDescriptionExample
include_dividendsboolWhether to deduct the preferred dividends paid from net income. Defaults to False.True
dilutedboolWhether to use diluted earnings per share. Defaults to True.False
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the ratios. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
compoundboolWhether 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
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
trailingintThe 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
Share