Calculate the Pretax Profit Margin, which is the ratio of a company’s pre-tax profit to its revenue, indicating how much profit a company makes before paying taxes on its earnings.

The Pretax Profit Margin is calculated by dividing the pre-tax profit by the revenue. It provides insight into how efficiently a company is able to generate profits from its revenue.

The formula is as follows:

\[\text{Pretax Profit Margin} = \text{Income Before Tax} / \text{Revenue}\]

Also known as: pretax margin, EBT margin.

Income Before Tax Profit Margin in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_income_before_tax_profit_margin as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["HSY", "GIS", "HRL"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.ratios.get_income_before_tax_profit_margin()

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

What were the pretax profit margins of Hershey, General Mills and Hormel Foods from 2021 to 2025?

Which returns:

  2021 2022 2023 2024 2025
GIS 0.1749 0.1603 0.1568 0.1484 0.0179
HRL 0.0989 0.1026 0.0837 0.0869 0.0548
HSY 0.2003 0.184 0.1945 0.2208 0.1038

Parameters

get_income_before_tax_profit_margin accepts the following parameters.

ParameterTypeDescriptionExample
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