Calculate the EBITDA margin, a profitability ratio that measures the percentage of revenue that remains as earnings before interest, taxes, depreciation and amortization (EBITDA).

EBITDA margin approximates a company’s core operating profitability before the effects of financing decisions (interest), tax jurisdictions, and non-cash accounting choices around fixed and intangible assets (depreciation and amortization). This makes it a commonly used metric to compare operating performance across companies with different capital structures, tax regimes, and depreciation policies.

The formula is as follows:

\[\text{EBITDA Margin} = (\text{Operating Income} + \text{Depreciation and Amortization}) / \text{Revenue}\]

Also known as: EBITDA-to-revenue ratio.

EBITDA Margin in Python or via the MCP

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_ebitda_margin as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["LIN", "AI.PA"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.ratios.get_ebitda_margin()

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

What were the EBITDA margins of Linde and Air Liquide from 2021 to 2025?

Which returns:

  2021 2022 2023 2024 2025
AI.PA 0.2649 0.2257 0.2555 0.2754 0.3023
LIN 0.3221 0.3196 0.3628 0.3749 0.383

Parameters

get_ebitda_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