Calculate the debt to capital ratio, a solvency ratio that measures the proportion of a company’s total capital (debt plus equity) that is financed by debt.

Unlike the debt to equity ratio, which can theoretically exceed one or become negative with low or negative equity, the debt to capital ratio is bounded between 0 and 1 under normal circumstances, making it easier to compare across companies with very different capital structures.

The formula is as follows:

\[\text{Debt to Capital Ratio} = \text{Total Debt} / (\text{Total Debt} + \text{Total Equity})\]

Also known as: capitalization ratio.

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

Calculate the Debt to Capital Ratio in Python

The Debt to Capital Ratio is available in the Ratios module of the open-source Finance Toolkit. Install it with:

pip install financetoolkit -U

Then call get_debt_to_capital_ratio as shown below.

from financetoolkit import Toolkit

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

debt_to_capital_ratios = toolkit.ratios.get_debt_to_capital_ratio()

Which returns:

  2021 2022 2023 2024 2025
AAPL 0.6839 0.7233 0.666 0.6764 0.6038
TSLA 0.2193 0.1113 0.1308 0.156 0.0918

Parameters

get_debt_to_capital_ratio 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