Calculate the effective tax rate, a financial ratio that measures the percentage of pretax income that is paid as taxes.

The effective tax rate is calculated by dividing the income tax expense by the pre-tax income.

The formula is as follows:

\[\text{Effective Tax Rate} = \text{Income Tax Expense} / \text{Income Before Tax}\]

Also known as: tax burden, actual tax rate.

No programming experience? With the Finance Toolkit MCP server, AI assistants such as Claude and ChatGPT can calculate the Effective Tax Rate for you. Just ask in plain English.

Calculate the Effective Tax Rate in Python

The Effective Tax Rate is available in the Ratios module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_effective_tax_rate as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(["AAPL", "TSLA"], api_key="FINANCIAL_MODELING_PREP_KEY")

effective_tax_rate = toolkit.ratios.get_effective_tax_rate()

Which returns:

  2021 2022 2023 2024 2025
AAPL 0.133 0.162 0.1472 0.2409 0.1561
TSLA 0.1102 0.0825 -0.5015 0.2043 0.2696

Parameters

get_effective_tax_rate 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.

The Ratios module page introduces the module, and the sidebar lists all of its functions.

Share