ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Math
  3. Financial Ratios in Excel: Liquidity, Margin and Debt

Financial Ratios in Excel: Liquidity, Margin and Debt

By ExcelReady Team·Updated November 3, 2026·7 min read

The short answer

Financial ratios in Excel are simple divisions between cells from the balance sheet and income statement. For example, the current ratio is =B4/B6 (current assets ÷ current liabilities) and gross margin is =(B2-B3)/B2. Wrap each ratio in IFERROR to handle a zero denominator, and in ROUND to show two decimals.

Key takeaways

  • Every ratio is one cell divided by another, so lay out the source figures clearly first.
  • Liquidity: current ratio = current assets ÷ current liabilities; quick ratio leaves out inventory.
  • Margins: gross margin = (revenue − cost of goods sold) ÷ revenue; net margin = net income ÷ revenue.
  • Debt: debt-to-equity = total liabilities ÷ shareholders' equity. Definitions vary, so state yours.
  • IFERROR stops #DIV/0! when a figure is zero or missing; ROUND keeps the output tidy.
On this page+
  1. What are financial ratios?
  2. How to set up the figures
  3. Liquidity ratios: current ratio and quick ratio
  4. Profitability ratios: margins and return on equity
  5. Leverage ratio: debt-to-equity
  6. How to handle zeros and missing figures with IFERROR
  7. How to round and format ratios
  8. How to compare ratios across years
  9. Practise it

Financial ratios in Excel turn a company's raw figures into numbers you can compare: how easily it pays its bills, how much of each sale it keeps, and how much it relies on debt. Each ratio is a simple division between two cells, plus IFERROR for zeros and ROUND for tidy output. This guide is for students, analysts and job seekers preparing for a finance Excel test. It explains each ratio in plain English and builds it on one set of example figures.

What are financial ratios?#

A financial ratio divides one figure by another so you can compare businesses of different sizes, or one business over time. The common ones fall into three groups:

GroupQuestion it answersExamples
LiquidityCan the business pay bills due soon?Current ratio, quick ratio
ProfitabilityHow much of each sale becomes profit?Gross margin, net margin, return on equity
Leverage (debt)How much does it rely on borrowed money?Debt-to-equity

The figures come from two reports. The income statement, also called the profit and loss, shows revenue and costs over a period. The balance sheet shows assets, liabilities and equity on one date. The guide to building a profit and loss statement shows how the income statement side is laid out.

How to set up the figures#

Put each source figure in its own labelled cell, so every ratio formula is short and easy to check. These are example figures for a small company, in A1:B9:

AB
1ItemAmount
2Revenue500,000
3Cost of goods sold300,000
4Current assets150,000
5Inventory60,000
6Current liabilities100,000
7Total liabilities180,000
8Shareholders' equity220,000
9Net income40,000

Current means due or usable within about a year. Cost of goods sold is the direct cost of what was sold. Shareholders' equity is what belongs to the owners: total assets minus total liabilities.

Liquidity ratios: current ratio and quick ratio#

Liquidity ratios check whether short-term assets cover short-term debts. The current ratio divides current assets by current liabilities:

Excel formula
=B4/B6

The result is 1.5: the company has 1.50 of current assets for each 1.00 it owes in the next year.

The quick ratio is stricter. It leaves out inventory, because stock can take time to sell:

Excel formula
=(B4-B5)/B6

The result is 0.9 ((150,000 − 60,000) ÷ 100,000). The brackets matter: without them, Excel divides inventory by liabilities first and returns a wrong answer. What counts as a comfortable level depends on the industry, so compare with similar businesses or past years rather than a single rule.

Profitability ratios: margins and return on equity#

Margins show how much of each sale the business keeps, written as percentages. Gross margin uses revenue minus the direct cost of sales:

Excel formula
=(B2-B3)/B2

Format the cell as a percentage: the result is 40%. Net margin uses profit after all costs:

Excel formula
=B9/B2

That gives 8%. The article on the profit margin formula explains the difference between margin and markup, which is a common test question.

Return on equity (ROE) compares profit with the owners' money in the business: =B9/B8 gives 18.2% (40,000 ÷ 220,000).

Leverage ratio: debt-to-equity#

Debt-to-equity compares what the company owes with what the owners have put in:

Excel formula
=B7/B8

The result is 0.818…, usually shown as 0.82. That means 0.82 of liabilities for each 1.00 of equity.

Definitions vary. Some textbooks and analysts use only interest-bearing debt, such as loans, instead of total liabilities. Both are valid, but they give different numbers, so write the definition next to the ratio. If you need ratios in "x : y" form, such as 9 : 11, the guide on how to calculate a ratio in Excel covers that.

How to handle zeros and missing figures with IFERROR#

If a denominator is zero or blank, the ratio shows #DIV/0!. That happens with a new company with no revenue yet, or a template where a figure hasn't been entered. Wrap the formula in IFERROR to show something cleaner:

Excel formula
=IFERROR(B4/B6,"n/a")

If B6 is 0, the cell shows n/a. Otherwise it shows the ratio as normal. The IFERROR function guide explains the syntax, and the article on fixing the #DIV/0! error covers other ways to handle it.

One warning: IFERROR hides every error, including a typo in a cell reference. If you only want to catch the zero case, test for it directly: =IF(B6=0,"n/a",B4/B6).

How to round and format ratios#

Use ROUND when the rounded value should be the real value, and number formatting when you only want to change what's shown. To store the quick ratio at two decimals, with the zero check included:

Excel formula
=IFERROR(ROUND((B4-B5)/B6,2),"n/a")

This returns 0.9. The ROUND function guide explains the second argument.

For display only, use formats instead:

  • Margins and ROE: Home > Number Format > Percentage.
  • Ratios with an "x": a custom format of 0.00"x" shows 1.5 as 1.50x while the cell still holds 1.5. Open it with Ctrl+1 on Windows or ⌘1 on a Mac, then choose Custom.

How to compare ratios across years#

A single ratio means little on its own. Put each year in its own column, with the same rows, and write each ratio once in the first year's column. Then fill it right (Windows: Ctrl+R; Mac: ⌘R). Because the references are relative, =B4/B6 becomes =C4/C6 for the next year. Add a row for the change between years to show which way each ratio is moving.

This layout, with source figures above and ratios below, is common in finance work and job tests. The guide to Excel skills for finance jobs lists the other skills that come up alongside ratios, and the finance Excel test lets you practise them under a timer.

Practise it#

Try the exercise on this page: it builds the quick ratio with ROUND and IFERROR in one formula. Then practise the department budget lesson in a live spreadsheet to work with divisions and percentages on real-looking figures, and practise IFERROR so a missing number never fills your report with errors.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Calculate the quick ratio. Click E2, subtract inventory (B5) from current assets (B4), divide by current liabilities (B6), round to 2 decimals and wrap it all in IFERROR with "n/a", then press Enter. Figures are examples.

fx
ABCDEF
1
Item
Amount
2
Revenue
500000
Quick ratio
3
Cost of goods sold
300000
4
Current assets
150000
5
Inventory
60000
6
Current liabilities
100000
7
Total liabilities
180000
8
Shareholders' equity
220000
9
10
11

Tip: Start inside: (B4-B5)/B6. Wrap that in ROUND(...,2), then wrap the whole thing in IFERROR(...,"n/a").

Practise this in a lesson

LessonPractice: department budgetCombine SUM, AVERAGE, ROUND and absolute references in a realistic budget sheet.LessonIFERRORReplace ugly errors like #DIV/0! with a clean fallback value using IFERROR, and learn when hiding errors backfires.Function guideIFERRORUse IFERROR to swap #N/A, #DIV/0! and other errors for a clean value. Examples with division and VLOOKUP, pitfalls, and live practice.Function guideROUNDRound to decimals, whole numbers or the nearest thousand with Excel's ROUND. Learn when formatting isn't enough, then practice live.

Frequently asked questions

How do I calculate financial ratios in Excel?

+

Put the figures from the balance sheet and income statement in a column, then divide the right cells. For example, =B4/B6 gives the current ratio if B4 holds current assets and B6 holds current liabilities.

What is the formula for the current ratio in Excel?

+

Divide current assets by current liabilities: =B4/B6. A result of 1.5 means there is 1.50 of current assets for every 1.00 of current liabilities.

How do I calculate debt-to-equity in Excel?

+

Divide total liabilities by shareholders' equity, for example =B7/B8. Some analysts use only interest-bearing debt instead of total liabilities, so say which definition you used.

How do I stop #DIV/0! in a ratio formula?

+

Wrap the formula in IFERROR: =IFERROR(B4/B6,"n/a"). If the denominator is zero or blank, the cell shows n/a instead of an error.

Sources

  • IFERROR function - Microsoft Support
  • ROUND function - Microsoft Support
  • Create a custom number format - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What are financial ratios?
  2. How to set up the figures
  3. Liquidity ratios: current ratio and quick ratio
  4. Profitability ratios: margins and return on equity
  5. Leverage ratio: debt-to-equity
  6. How to handle zeros and missing figures with IFERROR
  7. How to round and format ratios
  8. How to compare ratios across years
  9. Practise it

Keep reading

Math· 5 min read

Profit Margin and Markup Formulas in Excel

Profit margin is profit divided by the selling price: =(C2-B2)/C2, where B2 is the cost and C2 is the price. Markup is profit divided by the cost: =(C2-B2)/B2. Format both cells as percentages. A product that costs 60 and sells for 80 has a 25% margin but a 33.3% markup, because the same profit is divided by different numbers.

Math· 7 min read

How to Calculate a Ratio in Excel

To calculate a ratio in Excel, divide the first number by the second: =B2/C2 returns 20 when 240 students share 12 teachers. To show it as a ratio, join the result to text: =ROUND(B2/C2,1)&":1" displays 20:1. For a simplified whole-number ratio such as 16:9, divide both numbers by their GCD.

Projects· 6 min read

Build a Profit and Loss Statement in Excel

To build a profit and loss statement in Excel, keep every transaction in one list with a Category column. On a separate sheet, SUMIF totals each category, such as =SUMIF(A:A,"Sales",C:C). Revenue minus cost of goods gives gross profit; minus operating expenses gives operating profit. Divide by revenue for margins and compare with last month.

More on math

  • FV Function in Excel: Future Value of Savings
  • How to Calculate the Geometric Mean in Excel With GEOMEAN
  • Convert an Hourly Rate to an Annual Salary in Excel
  • How to Increase or Decrease a Number by a Percentage
  • Calculate Inventory Turnover Ratio in Excel
  • IRR in Excel: Internal Rate of Return in Plain English
All math articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free