Financial Ratios in Excel: Liquidity, Margin and Debt
By ExcelReady TeamUpdated 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+
- What are financial ratios?
- How to set up the figures
- Liquidity ratios: current ratio and quick ratio
- Profitability ratios: margins and return on equity
- Leverage ratio: debt-to-equity
- How to handle zeros and missing figures with IFERROR
- How to round and format ratios
- How to compare ratios across years
- 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:
| Group | Question it answers | Examples |
|---|---|---|
| Liquidity | Can the business pay bills due soon? | Current ratio, quick ratio |
| Profitability | How 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:
| A | B | |
|---|---|---|
| 1 | Item | Amount |
| 2 | Revenue | 500,000 |
| 3 | Cost of goods sold | 300,000 |
| 4 | Current assets | 150,000 |
| 5 | Inventory | 60,000 |
| 6 | Current liabilities | 100,000 |
| 7 | Total liabilities | 180,000 |
| 8 | Shareholders' equity | 220,000 |
| 9 | Net income | 40,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:
=B4/B6The 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:
=(B4-B5)/B6The 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:
=(B2-B3)/B2Format the cell as a percentage: the result is 40%. Net margin uses profit after all costs:
=B9/B2That 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:
=B7/B8The 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:
=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:
=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.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Amount | |||||
| 2 | Quick ratio | |||||
| 3 | ||||||
| 4 | ||||||
| 5 | ||||||
| 6 | ||||||
| 7 | ||||||
| 8 | ||||||
| 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
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.