ROI and payback calculator in Excel
Is the purchase worth it? This template sets investment, savings, income and costs side by side year by year and works out the payback period, net present value, internal rate of return and ROI. A separate sheet shows how much the result depends on a single assumption. The sample is an LED lighting upgrade with invented figures.
In short: the inputs produce one cash flow per year. The running total shows when the investment has paid for itself (payback). NPV discounts the cash flows to today and, together with the investment, gives the net present value; IRR returns the internal rate of return. The sample figures are invented. The template is not investment or tax advice.
You should know: NPV and IRR and absolute references.
Try it right away
It all starts with the cash flow series: savings that grow a little every year, minus running costs.
Task In B6, work out the cash flow for the year in A6: the savings, which grow every year by the rate in B2, minus the running costs in B3, rounded to cents. The formula is then filled down to B10.
| A | B | |
|---|---|---|
| 1 | Savings in year 1 | 1200 |
| 2 | Change per year | 0.02 |
| 3 | Running costs per year | 180 |
| 4 | ||
| 5 | Year | Cash flow |
| 6 | 1 | |
| 7 | 2 | |
| 8 | 3 | |
| 9 | 4 | |
| 10 | 5 |
Download the free ROI and payback calculator
The workbook has four sheets: the ROI calculator with 14 inputs, the results and the cash flows for up to 30 years; Sensitivity with seven scenarios for one input and a chart; a savings example that feeds the first-year savings; and instructions. Only the yellow cells can be edited. Amounts carry no currency symbol, so the file works for dollars and pounds. For any other investment, such as a machine, a vehicle or software, type your own figures over the sample.
Enlarge previewDownload the finished template
The finished Excel file roi-payback-calculator.xlsx, with sample rows and instructions, is free. All you need is a free account: no subscription, no payment details.
Figures, rates and sample data in the templates are as of 13 November 2026, without guarantee. Check that they still apply to you. The templates are mainly meant to show how to build this in Excel.
Create a free account and download the template Already have an account? Log in
The sample: an LED lighting upgrade with invented figures
Every assumption in the sample is made up and says nothing about what such a project costs or saves in real life: 120 light fittings, 72 watts each before and 30 watts after, 3,000 hours of use a year, 0.24 per kWh, 600 a year less maintenance, an investment of 18,000, running costs of 250 a year, an overhaul for 1,200 in year 6, a life of 10 years and a discount rate of 6%.
With these assumptions the template works out savings of 4,228.80 in the first year, a payback period of 4.4 years, a net present value of 12,916.81 and an internal rate of return of 18.96%. Change one assumption and everything recalculates.
How the cash flow series is built
| Column | Content | Formula in row 23 (year 1) |
|---|---|---|
| B | Savings | =ROUND($D$7*(1+$D$8)^(A23-1),2) |
| C | Income | =ROUND($D$9*(1+$D$10)^(A23-1),2), only up to the year in D11 |
| D | Running costs | =-ROUND($D$12*(1+$D$13)^(A23-1),2) |
| E | Investment, one-off cost, residual value | Year 0: =-($D$4-$D$5), then the one-off cost and the residual value in their years |
| F | Cash flow | =B23+C23+D23+E23 |
| G | Cumulative | =G22+F23 |
| H | Present value | =ROUND(F23/(1+$D$17)^A23,2) |
Years after the end of the life calculate with 0 and turn grey. That way the formulas work for any life from 1 to 30 years without deleting rows.
Payback period: when is the money back?
The payback period is the year in which the cumulative cash flow turns from negative to positive.
Task When has the investment paid for itself? In C2, build the running total of the cash flows from year 0 down to this row; the formula is filled down to C9. Then count in F2 how many years the cumulative value is negative. That is also the year in which it turns positive.
| A | B | C | D | E | F | G | |
|---|---|---|---|---|---|---|---|
| 1 | Year | Cash flow | Cumulative | ||||
| 2 | 0 | -6000 | Paid back in year | ||||
| 3 | 1 | 1400 | |||||
| 4 | 2 | 1450 | |||||
| 5 | 3 | 1500 | |||||
| 6 | 4 | 1500 | |||||
| 7 | 5 | 1550 | |||||
| 8 | 6 | 1600 | |||||
| 9 | 7 | 1600 | |||||
| 10 | |||||||
| 11 |
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
The template is more precise: a helper column finds the turn and divides what was still missing at the end of the previous year by the cash flow of the year, =A26-G26/F27. That turns "in year 5" into 4.4 years. The same calculation on the present values gives the discounted payback period. It is always longer, because later cash flows count for less once discounted.
NPV, IRR and ROI
- Net present value:
=NPV($D$17,F23:F52)+F22. NPV discounts years 1 to 30, and the investment of year 0 is added without discounting. A positive NPV means the investment returns more than the discount rate. - Internal rate of return:
=IRR(F22:F52), the rate at which NPV would be 0. - ROI over the life: the net gain of all years divided by the investment after any grant.
How NPV and IRR work in detail is covered in the lesson NPV and IRR. To find the value an input would need for NPV to be exactly 0, use Goal Seek.
Sensitivity: what if an assumption is wrong?
Every ROI calculation rests on assumptions. The Sensitivity sheet changes one of them, which you pick from investment, savings, income and running costs, in steps of 10 percent down and up, and shows NPV, IRR and payback for each scenario. Here is the same idea with the discount rate:
Task How much does the result depend on the discount rate? In E2, work out the net present value of the cash flows at the rate in D2. The formula is then filled down to E6, for five rates.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Year | Cash flow | Discount rate | NPV | |
| 2 | 0 | -6000 | 0.02 | ||
| 3 | 1 | 1400 | 0.04 | ||
| 4 | 2 | 1450 | 0.06 | ||
| 5 | 3 | 1500 | 0.08 | ||
| 6 | 4 | 1500 | 0.1 | ||
| 7 | 5 | 1550 | |||
| 8 | 6 | 1600 | |||
| 9 | 7 | 1600 |
This exercise is part of Premium.
Premium unlocks every exercise in every lesson, unlimited practice with fresh tasks and the final test with certificate.
See Premium Already Premium? Log in
The first exercise in this lesson is free.
In the sample, savings that come in 30% lower still leave a positive NPV, but the payback period grows from 4.4 to 6.7 years. Thresholds like that are what the table is for.
Common mistakes
Including the investment in NPV
NPV treats its first value as a payment at the end of year 1. If the investment is inside the range, it is discounted by a year and the result looks better than it is. Add it outside the function.
Looking only at the payback period
Payback tells you when the money is back, but nothing about the years after that and nothing about the time value of money. Two investments with the same payback can have very different NPVs.
Optimistic growth rates
Two percentage points more price growth change the result a lot over 10 or 20 years. Run the sensitivity and, if in doubt, use the more cautious assumption.
Mixing amounts before and after tax, or real and nominal rates
Keep all amounts on the same basis. If your cash flows include price increases, the discount rate should include inflation too.
The functions in German Excel
The German version is called Wirtschaftlichkeitsberechnung and uses a solar panel example. German Excel separates arguments with a semicolon.
| English | German |
|---|---|
| NPV | NBW |
| IRR | IKV |
| ROUND, MIN, COUNT | RUNDEN, MIN, ANZAHL |
| IF, AND, IFERROR | WENN, UND, WENNFEHLER |
Which Excel versions does this work in?
Microsoft lists NPV and IRR for Excel for Microsoft 365, Excel 2024, 2021, 2019 and 2016, and for Microsoft 365, 2024 and 2021 on the Mac as well. All other functions in the template exist in those versions too. If IRR cannot find a result after 20 tries, it returns #NUM! according to Microsoft; the template then shows "cannot be calculated".
Frequently asked questions
How do you calculate ROI?
Net gain divided by the investment. Over a life of several years, the net gain is the sum of all yearly cash flows minus the investment. In the sample that is 24,366.77 divided by 18,000, or 135.4%.
What is a good payback period?
That depends on the life of the asset and on your alternatives. The payback must at least be shorter than the life, and the NPV tells you whether the investment beats your discount rate.
Which discount rate should I use?
The return you could earn elsewhere with the money, or the interest you pay on a loan. That is your decision; the sensitivity exercise above shows how much the result depends on it.
How do I include a loan?
The template judges the investment itself, independent of how it is financed. For loan payments, see the amortization schedule; for compounding, the compound interest calculator.
Where can I learn to build larger models?
On the page financial modeling in Excel.