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. ROI Formula in Excel: Calculate Return on Investment

ROI Formula in Excel: Calculate Return on Investment

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

The short answer

ROI (return on investment) is the gain divided by the cost. In Excel, if the cost is in B2 and the total return is in C2, type =(C2-B2)/B2 and format the cell as a percentage. A cost of 2,000 that brings back 5,000 gives 150%. A negative result means you lost money on the investment.

Key takeaways

  • ROI = (Return - Cost) / Cost. In Excel: =(C2-B2)/B2, formatted as a percentage.
  • Always divide by the cost, not by the return. Dividing by revenue gives a margin, not ROI.
  • Include every cost: setup and running costs both belong in the bottom of the fraction.
  • Plain ROI ignores time. For a yearly figure, use =(C2/B2)^(1/years)-1.
  • Wrap the formula in IFERROR or IF to avoid #DIV/0! when the cost is still blank.
On this page+
  1. What is ROI?
  2. How to calculate ROI in Excel
  3. How to include every cost
  4. How to calculate annualized ROI
  5. ROI vs profit margin and other measures
  6. How to find the return you need for a target ROI
  7. Common ROI mistakes in Excel
  8. Practise it

The ROI formula in Excel is =(Return-Cost)/Cost. ROI stands for return on investment: how much you gained for each unit of money you put in. Type the formula with cell references, format the result as a percentage, and you can compare campaigns, projects or purchases side by side. This guide is for anyone who has to answer "was it worth it?" in a spreadsheet, at work or in a job test.

What is ROI?#

ROI measures the profit from an investment as a share of its cost. The formula is:

Excel formula
ROI = (Return - Cost) / Cost
  • Return is everything the investment brought back: sales, savings or the final value.
  • Cost is everything you spent to get it.
  • Return - Cost is the gain (or loss).

If you spend 2,000 and get 5,000 back, the gain is 3,000 and the ROI is 3,000 / 2,000 = 1.5, which is 150%. An ROI of 0% means you broke even. A negative ROI means you lost money.

How to calculate ROI in Excel#

Put the cost and the return in their own columns, then divide the gain by the cost. Here is a simple marketing table:

ABCD
1CampaignCostReturnROI
2Email2,0005,000
3Search ads8,00010,000
4Trade show12,0009,000
5Social3,0004,200
  1. Click D2 and type:

    Excel formula
    =(C2-B2)/B2
  2. Press Enter. The result is 1.5.

  3. Format it as a percentage: Home > %, or press Ctrl+Shift+% (Mac: Control+Shift+%). It now shows 150%.

  4. Fill the formula down to D5 (Windows: Ctrl+D; Mac: ⌘D).

CampaignROI
Email150%
Search ads25%
Trade show-25%
Social40%

The brackets matter. Excel divides before it subtracts, so =C2-B2/B2 would calculate 5,000 - 1 = 4,999. If you're new to building formulas like this, start with the lesson on your first formulas.

ROI is the same maths as percent change, with the cost as the "old" value and the return as the "new" one. The percent change formula guide explains why you always divide by the starting value.

How to include every cost#

ROI is only honest if the cost includes everything you spent. A project often has a one-off setup cost and a running cost. Add them before you divide:

ABCDE
1ProjectSetup costRunning costReturnROI
2Email2,0005005,000100%
3Webinar4,0001,0006,50030%
4Trade show9,0003,00010,800-10%
5Partner3,0001,5007,20060%

In E2:

Excel formula
=(D2-SUM(B2:C2))/SUM(B2:C2)

For Email, the total cost is 2,500 and the gain is 2,500, so ROI is 100%. Counting only the setup cost would have shown 150% and made the project look better than it was.

For the ROI of all four projects together, add up first and divide once: =(SUM(D2:D5)-SUM(B2:C5))/SUM(B2:C5) gives about 22.9%. Don't average the four ROI percentages: that gives a small project the same weight as a big one.

How to calculate annualized ROI#

Plain ROI ignores time. A 40% return in one year is far better than 40% over three years. Annualized ROI turns a total return into a yearly rate:

Excel formula
=(End/Start)^(1/Years)-1

If 10,000 grows to 14,000 in 3 years:

Excel formula
=(14000/10000)^(1/3)-1

The result is about 11.87% a year, compared with 40% in total. This is the same calculation as the compound annual growth rate, explained in the CAGR formula guide. If you have exact start and end dates, YEARFRAC gives the years: =(C2/B2)^(1/YEARFRAC(D2,E2))-1.

ROI vs profit margin and other measures#

ROI divides the gain by the cost. Other measures divide by something else, so keep the labels clear:

MeasureFormulaAnswers
ROI(Return - Cost) / CostHow much did we gain per unit spent?
Profit margin(Revenue - Cost) / RevenueHow much of each sale is profit?
Return on ad spendRevenue / Ad spendHow much revenue per unit of ad spend?

On the Email row, ROI is 150% but the margin is (5,000 - 2,000) / 5,000 = 60%. Both are right; they answer different questions. See the profit margin formula guide for margin and markup.

ROI also ignores when the money arrives. For long projects with cash coming in over several years, a discounted measure is fairer. The NPV function guide shows how to value future cash in today's money.

How to find the return you need for a target ROI#

Turn the formula around when you know the ROI you want and need the return. Rearranged, ROI = (Return - Cost) / Cost becomes:

Excel formula
Return needed = Cost * (1 + Target ROI)

If a project costs 12,000 (in B2) and your manager wants at least 40% ROI (in F1), type:

Excel formula
=B2*(1+$F$1)

The result is 16,800. Anything less than that misses the target. The $ signs keep F1 fixed when you fill the formula down a list of projects, so every row compares against the same target.

To flag each project, add a check next to the ROI column:

Excel formula
=IF(D2>=$F$1,"Meets target","Below target")

With the ROI table above and a 40% target, Email (150%) and Social (40%) meet it, while Search ads (25%) and the Trade show (-25%) don't. For harder cases, such as a price that must deliver a target ROI, Goal Seek can work backwards to the input for you.

Common ROI mistakes in Excel#

Most wrong ROI figures come from one of these:

  1. Dividing by the return. =(C2-B2)/C2 is a margin, not ROI.
  2. Missing brackets. =C2-B2/B2 subtracts 1 from the return. Put the gain in brackets.
  3. Multiplying by 100 and formatting as %. That shows 15000% instead of 150%. Do one or the other, and see how percentage formatting works.
  4. #DIV/0! on empty rows. If the cost is blank, use =IF(B2=0,"",(C2-B2)/B2) or =IFERROR((C2-B2)/B2,"").
  5. Leaving out costs. Staff time, fees and running costs all lower the real ROI.

Practise it#

ROI is percent change with a business label. Practise percent change in a live spreadsheet: you type the formula, format it, and the sheet checks your answer at once. Then try the ROI exercise on this page, where the cost is split over two columns.

Try it yourself

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

Each project has a setup cost and a running cost. Click E3 and calculate the ROI for the Webinar: return minus total cost, divided by total cost. Use SUM to add the two costs.

fx
ABCDEF
1
Project
Setup cost
Running cost
Return
ROI
2
Email
2000
500
5000
3
Webinar
4000
1000
6500
4
Trade show
9000
3000
10800
5
Partner
3000
1500
7200
6
7
8

Tip: Total cost is SUM(B3:C3). Take it away from D3, put that in brackets, then divide by SUM(B3:C3) again.

Practise this in a lesson

LessonPercentages and % changeCalculate percent change with (new - old) / old, format it as a percentage, and grow a number by a percent.LessonFreeYour first formulasType values, write formulas that start with =, and see how they recalculate.

Frequently asked questions

What is the formula for ROI in Excel?

+

Type =(Return-Cost)/Cost with cell references, for example =(C2-B2)/B2, then format the cell as a percentage with Ctrl+Shift+% (Mac: Control+Shift+%).

How do I calculate ROI as a percentage in Excel?

+

The formula already gives a decimal such as 0.25. Format the cell as Percentage from the Home tab and it shows 25%. Don't multiply by 100 as well, or you'll see 2500%.

How do I calculate annualized ROI in Excel?

+

Use =(End/Start)^(1/Years)-1. For 10,000 that grows to 14,000 in 3 years, =(14000/10000)^(1/3)-1 gives about 11.87% a year, compared with 40% in total.

What is a good ROI?

+

It depends on the industry, the risk and how long the money is tied up. Compare ROI against your other options over the same period rather than against a single fixed number.

What is the difference between ROI and profit margin?

+

ROI divides profit by what you invested. Profit margin divides profit by revenue. The same deal can have a high ROI and a low margin, so label which one you report.

Sources

  • Calculate percentages - Microsoft Support
  • Calculation operators and precedence in Excel - 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 is ROI?
  2. How to calculate ROI in Excel
  3. How to include every cost
  4. How to calculate annualized ROI
  5. ROI vs profit margin and other measures
  6. How to find the return you need for a target ROI
  7. Common ROI mistakes in Excel
  8. Practise it

Keep reading

Math· 6 min read

Percent Change Formula in Excel (With Examples)

The percent change formula in Excel is =(new-old)/old. If last year's sales are in B2 and this year's in C2, type =(C2-B2)/B2, then press Ctrl+Shift+% to show it as a percentage. A positive result is an increase and a negative result is a decrease. Always divide by the old value.

Math· 6 min read

CAGR Formula in Excel: Compound Annual Growth Rate

To calculate CAGR in Excel, divide the ending value by the starting value, raise the result to the power of one over the number of years, and subtract 1: =(B6/B2)^(1/4)-1. Growth from 50,000 to 80,000 over four years gives 12.47%. The number of years is the number of periods between the values, not the number of rows.

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.

More on math

  • How to Round Numbers in Excel (ROUND, ROUNDUP, ROUNDDOWN)
  • Round to the Nearest 5, 10 or 0.5 in Excel
  • Round to Thousands or Millions in Excel
  • How to Make a Running Total in Excel
  • Simple Interest Formula in Excel With Examples
  • Square Roots and Powers in Excel (SQRT, POWER, ^)
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