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. Calculate the Payback Period in Excel

Calculate the Payback Period in Excel

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

The short answer

The payback period is how long an investment takes to earn back its cost. In Excel, list the yearly cash flows, add a cumulative column with =SUM($B$2:B2), and find the last year it is negative. Payback = that year + the amount still unrecovered ÷ the next year's cash flow. Excel has no PAYBACK function.

Key takeaways

  • Excel has no built-in payback function: you build it from a cumulative cash flow column.
  • =SUM($B$2:B2) filled down gives a running total because the $ locks the first cell.
  • Payback = last negative year + (unrecovered amount ÷ next year's cash flow).
  • Discounted payback uses the same steps on cash flows divided by (1 + rate)^year.
  • Payback ignores everything after the break-even year, so use it next to NPV, not instead of it.
On this page+
  1. What is the payback period?
  2. Set up the cash flows
  3. Build a cumulative cash flow column with SUM
  4. Find the payback year with IF
  5. Calculate the payback period in one formula
  6. Discounted payback period
  7. Common payback period mistakes
  8. Practise it

The payback period is the time an investment takes to earn back what it cost. Excel has no payback period function, so you build it in three steps: list the cash flows, add a cumulative total with SUM, and find the year the total turns positive with IF. This guide is for anyone comparing projects, equipment purchases or business ideas, and for candidates who meet payback questions in a finance Excel test.

What is the payback period?#

The payback period is the number of years until the money coming in equals the money you spent. A project that costs 10,000 and returns 2,500 a year pays back in 4 years.

When every year's cash flow is the same, the formula is a simple division:

Excel formula
=10000/2500

That returns 4. Real projects rarely earn the same amount each year, though. When the cash flows differ, you need a running total to see when the investment is covered. That is what the rest of this guide builds.

A shorter payback means your money is at risk for less time. That makes it a popular first check, next to the NPV function, which tells you whether a project is worth doing at all.

Set up the cash flows#

Put one year per row, with the investment as a negative number in year 0. Money out is negative, money in is positive.

ABC
1YearCash flowCumulative
20-10,000-10,000
313,000-7,000
423,500-3,500
534,000500
644,0004,500
754,0008,500

Year 0 is "today", when you pay for the investment. Years 1 to 5 are the cash the project brings in. If your forecast comes from monthly figures, the cash flow forecast guide shows how to build those first.

Build a cumulative cash flow column with SUM#

The cumulative column shows how much is still unrecovered at the end of each year. In C2, type:

Excel formula
=SUM($B$2:B2)

Then fill it down to C7 (Windows: select C2:C7 and press Ctrl+D; Mac: ⌘D). The first cell, $B$2, is locked with dollar signs, so the range grows as you fill: C3 becomes =SUM($B$2:B3), C4 becomes =SUM($B$2:B4), and so on. This is a running total, and the article on how to build a running total explains it in more detail.

To add the dollar signs quickly, click inside the reference and press F4 on Windows or ⌘T on a Mac. The absolute references lesson lets you practise exactly this.

The cumulative total is negative in years 0, 1 and 2, then turns positive in year 3. So the investment pays back during year 3.

Find the payback year with IF#

Payback happens in the row where the previous total is negative and the current total is not. An IF formula can check that and calculate the exact point. In D3, type:

Excel formula
=IF(AND(C2<0,C3>=0),A2-C2/B3,"")

Fill it down to D7. Only one row passes the test. In D5 the formula becomes:

Excel formula
=IF(AND(C4<0,C5>=0),A4-C4/B5,"")

It returns 2.875. Here is what each part does:

  • AND(C4<0,C5>=0) checks that the total was still negative last year and is not negative this year.
  • A4 is the last full year before payback: 2.
  • -C4/B5 is the fraction of year 3 needed: 3,500 still unrecovered ÷ 4,000 earned that year = 0.875. The minus sign turns the negative 3,500 into a positive number.
  • "" leaves every other row blank.

So the payback period is 2.875 years, or about 2 years and 10.5 months (0.875 × 12 = 10.5). The IF function guide covers IF and AND in more detail.

Calculate the payback period in one formula#

If you want the answer in a single cell, count the negative years and pick the right values with INDEX:

Excel formula
=COUNTIF(C3:C7,"<0")-INDEX(C2:C7,COUNTIF(C3:C7,"<0")+1)/INDEX(B2:B7,COUNTIF(C3:C7,"<0")+2)

This also returns 2.875. COUNTIF(C3:C7,"<0") counts the full years after year 0 that are still negative: 2. The first INDEX picks the last negative total (-3,500), and the second picks the next year's cash flow (4,000).

This version assumes the total crosses zero only once, which is true for a normal project: one big cost, then income. If the project never pays back, the second INDEX points past the range and returns #REF!. Wrap it in a check such as =IF(C7<0,"Not paid back", ...) to show a clear message instead.

Discounted payback period#

The discounted payback period uses cash flows that are adjusted for the time value of money: 1,000 next year is worth less than 1,000 today. Divide each cash flow by (1 + rate) to the power of its year, then repeat the same steps.

With a discount rate of 8% in F1, put this in a new column and fill it down:

Excel formula
=B2/(1+$F$1)^A2
YearCash flowDiscountedCumulative
0-10,000-10,000.00-10,000.00
13,0002,777.78-7,222.22
23,5003,000.69-4,221.54
34,0003,175.33-1,046.21
44,0002,940.121,893.91

The cumulative total turns positive in year 4, so the discounted payback is 3 + 1,046.21 ÷ 2,940.12 = about 3.36 years. It is always longer than the simple payback, because later money counts for less.

Common payback period mistakes#

Most wrong answers come from the setup, not the formula. Check these:

  1. The investment is positive. If year 0 is 10,000 instead of -10,000, the cumulative total is never negative and nothing is found.
  2. No dollar signs in the SUM. =SUM(B2:B2) filled down only adds one cell per row. Lock the start: $B$2.
  3. Using the wrong year. Add the fraction to the last negative year (2), not the payback year (3).
  4. Dividing by the cumulative total. Divide the unrecovered amount by that year's cash flow (B5), not by the cumulative figure (C5).
  5. Reading payback as profit. Payback ignores everything after the break-even year. A project with a short payback can still earn less overall. Compare it with NPV, and see the break-even analysis guide for the unit-based version of the same idea.

Practise it#

The payback period is just SUM, IF and a locked reference working together. Try the exercise on this page, then practise SUM in a live spreadsheet and build conditions in the IF function lesson: you type each formula and it is checked instantly. The SUM function guide and IF function guide are quick references for the syntax. For finance-style questions under time pressure, try the finance Excel mock test.

Try it yourself

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

Column C is the cumulative cash flow. It turns positive in year 3. Click D5 and use IF with AND to return the payback period when C4 is negative and C5 is not, then press Enter.

fx
ABCDE
1
Year
Cash flow
Cumulative
Payback
2
0
-10000
-10000
3
1
3000
-7000
4
2
3500
-3500
5
3
4000
500
6
4
4000
4500
7
5
4000
8500
8
9
10

Tip: Inside IF, test AND(C4<0,C5>=0). If true, return A4-C4/B5: the year before, plus the unrecovered amount divided by this year's cash flow.

Practise this in a lesson

LessonSUM and AutoSumAdd up a column of numbers with SUM, then let AutoSum write the formula for you.LessonThe IF functionMake a cell show one result or another depending on a condition, like Pass/Fail or Over/Under budget.LessonRelative vs absolute references ($)Lock a cell with $ so it doesn't move when you copy a formula, one of the most-tested Excel skills.Function guideSUMAdd up columns, rows and separate ranges with Excel's SUM function. Clear examples, common mistakes and a live practice exercise.Function guideIFLearn Excel's IF function with practical examples: flag budgets, label rows and return blanks. Avoid the classic mistakes and practice live.

Frequently asked questions

What is the formula for payback period?

+

When cash flows are equal each year, payback = initial investment ÷ yearly cash flow. When they differ, payback = the last year with a negative cumulative cash flow + the amount still unrecovered ÷ the next year's cash flow.

Is there a payback period function in Excel?

+

No. Excel has NPV and IRR but no payback function. You calculate it with a cumulative cash flow column and a short formula using IF, or COUNTIF and INDEX.

How do I calculate payback period with equal cash flows in Excel?

+

Divide the investment by the yearly cash flow. For a 12,000 cost that returns 4,000 a year, =12000/4000 gives 3 years.

What is the discounted payback period?

+

It is the payback period calculated on discounted cash flows, which takes the time value of money into account. Divide each cash flow by (1 + rate)^year, build a cumulative column, and use the same payback formula. It is always longer than the simple payback.

What does it mean if the cumulative cash flow never turns positive?

+

The investment does not pay back within the years you listed. Show a message such as "Not paid back" instead of a number, and check whether more years should be in the forecast.

Sources

  • SUM function - Microsoft Support
  • IF function - Microsoft Support
  • NPV function - 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 the payback period?
  2. Set up the cash flows
  3. Build a cumulative cash flow column with SUM
  4. Find the payback year with IF
  5. Calculate the payback period in one formula
  6. Discounted payback period
  7. Common payback period mistakes
  8. Practise it

Keep reading

Math· 6 min read

How to Make a Running Total in Excel

To make a running total in Excel, type =SUM($B$2:B2) in the first row next to your numbers and fill it down. The dollar signs lock the start of the range at B2, while the end moves down one row at a time, so each row adds everything from the top to itself. The last row equals the grand total.

Math· 6 min read

NPV Function in Excel: Net Present Value Explained

NPV returns the net present value of future cash flows at a given discount rate. Write =NPV(rate, values) for the cash flows from year 1 onward, then add the upfront cost separately: =NPV(8%,B3:B7)+B2. NPV assumes every value arrives at the end of a period, so putting the year-0 cost inside the function discounts it by mistake.

Projects· 7 min read

Break-Even Analysis in Excel, Step by Step

For a break-even analysis in Excel, put fixed costs, price per unit and variable cost per unit in three cells. Break-even units = fixed costs / (price - variable cost), for example =B1/(B2-B3). Wrap it in ROUNDUP for whole units, then multiply by the price for break-even revenue. A profit table shows profit at each sales level.

More on math

  • Percent Change Formula in Excel (With Examples)
  • Percentage Formula in Excel: 5 Everyday Calculations
  • How to Calculate Percentage of Total in Excel
  • PERCENTILE and QUARTILE in Excel, Explained Simply
  • Excel PERCENTRANK: Find the Percentile Rank of a Score
  • PMT Function in Excel: Calculate a Loan Payment
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