Debt-to-Equity Calculator Formula

Understand the math behind the debt-to-equity calculator. Each variable explained with a worked example.

Formulas Used

Debt-to-Equity Ratio

de_ratio = total_equity > 0 ? total_debt / total_equity : 0

Equity as % of Total Capital

equity_pct = (total_debt + total_equity) > 0 ? (total_equity / (total_debt + total_equity)) * 100 : 0

Debt as % of Total Capital

debt_pct = (total_debt + total_equity) > 0 ? (total_debt / (total_debt + total_equity)) * 100 : 0

Variables

VariableDescriptionDefault
total_debtTotal Debt (Liabilities)(USD)400000
total_equityTotal Shareholder Equity(USD)600000

How It Works

How to Calculate Debt-to-Equity Ratio

Formula

Debt-to-Equity Ratio = Total Liabilities / Total Shareholder Equity

This ratio reveals how much of the company is funded by borrowed money relative to owner investment. A D/E of 1.0 means equal parts debt and equity. Higher values indicate greater financial leverage, which amplifies both gains and losses. Lenders and investors watch this ratio closely when assessing creditworthiness.

Worked Example

A company carries $400,000 in total debt and $600,000 in shareholder equity.

total_debt = 400000total_equity = 600000
  1. 01D/E Ratio = $400,000 / $600,000 = 0.67
  2. 02Equity portion = $600,000 / $1,000,000 = 60%
  3. 03Debt portion = $400,000 / $1,000,000 = 40%
  4. 04The company uses $0.67 of debt for every $1 of equity.

Ready to run the numbers?

Open Debt-to-Equity Calculator