How to calculate Debt-to-Equity Ratio

The debt-to-equity ratio compares what a company owes with the equity its owners have put in.

Formula

Debt-to-equity = total liabilities ÷ shareholders' equity (some analysts use interest-bearing debt only)

SQL query

This example assumes: balance_sheets(as_of date, total_liabilities numeric, interest_bearing_debt numeric, shareholders_equity numeric). It is written in PostgreSQL syntax; date functions differ slightly in MySQL, BigQuery and SQLite, and your column names will differ from these.

SELECT as_of,
       total_liabilities / NULLIF(shareholders_equity, 0) AS debt_to_equity_total,
       interest_bearing_debt / NULLIF(shareholders_equity, 0) AS debt_to_equity_interest_bearing
FROM balance_sheets
ORDER BY as_of;

Common mistakes that make Debt-to-Equity Ratio wrong

  • There are two common definitions (all liabilities, or only borrowings); show which one a figure uses.
  • Zero or negative equity makes the ratio undefined or misleading.
  • Lease liabilities are treated differently across accounting standards.

Ask for Debt-to-Equity Ratio in plain English

Instead of writing the query yourself, you can type the question. SchemaChat turns it into SQL against your connected database or uploaded file, runs it, and shows the SQL and the figures it used so you can check the answer before you share it. It does not replace your judgement about the definition: check that the query matches the formula your business uses.

  • What is our debt-to-equity ratio at each quarter end?
  • How has interest-bearing debt changed over the last two years?

Frequently asked questions

What is Debt-to-Equity Ratio?
The debt-to-equity ratio compares what a company owes with the equity its owners have put in.
How do you calculate Debt-to-Equity Ratio?
Debt-to-equity = total liabilities ÷ shareholders' equity (some analysts use interest-bearing debt only). The SQL example on this page shows the same calculation against a simple table.
What commonly goes wrong when calculating Debt-to-Equity Ratio?
There are two common definitions (all liabilities, or only borrowings); show which one a figure uses.