Keystroke Labs

IRR and NPV calculator for uneven cash flows, with the keys for your calculator

Works on: HP 12C, BA II Plus and HP 10bII+

Type the initial cash flow, then each later flow in order. A flow that repeats goes in once with how many periods in a row it lasts, the way the calculators take it (Nj on the HP 12C and 10bII+, F on the BA II Plus).

Later cash flows, in order (amount × how many periods in a row)

  1. Flow 1×
  2. Flow 2×
  3. Flow 3×
  4. Flow 4×

Up to 20 flows, each repeated up to 99 times: limits all three calculators accept.

NPV13,106.25≥ 0: the flows earn at least 12% per period
IRR16.26%per period
Payback3.20 periods
Discounted payback4.08 periods
Profitability index1.11
Present value of each period
PeriodCash flowPresent valueRunning total
0-120,000.00-120,000.00-120,000.00
130,000.0026,785.71-93,214.29
240,000.0031,887.76-61,326.53
340,000.0028,471.21-32,855.32
450,000.0031,775.90-1,079.42
525,000.0014,185.6713,106.25

Keys for these numbers on the BA II Plus

StepKeysDisplay showsWhat it does
1CF2NDCLR WORKCE|CCFo= 0.00Cash-flow worksheet, then CLR WORK to erase old flows.
2120000+|−ENTERCFo= -120,000.00CF0, today: negative, money that goes out.
3↓30000ENTERC01= 30,000.00Period 1.
4↓F01= 1.00It happens once.
5↓40000ENTERC02= 40,000.00Periods 2 to 3.
6↓2ENTERF02= 2.00It happens 2 times in a row.
7↓50000ENTERC03= 50,000.00Period 4.
8↓F03= 1.00It happens once.
9↓25000ENTERC04= 25,000.00Period 5.
10↓F04= 1.00It happens once.
11NPV12ENTERI= 12.00NPV worksheet: the discount rate I, in percent per period.
12↓CPTNPV= 13,106.25NPV.
13IRRCPTIRR= 16.26IRR in percent per period.

Got a different NPV?

Each of these comes from keying these same numbers with one thing wrong:

You seeWhy
NPV= 253,106.25CF0 went in positive (the change-sign key was missed), so the investment counts as money received.
NPV= -9,849.57Each repeated flow was entered once, without its count (Nj / F), so later flows move to earlier periods.
11,702.01Spreadsheet NPV() with CF0 inside the range: it discounts every flow one period too many. Use =NPV(rate, CF1:CFn) + CF0.

What NPV and IRR tell you

NPV is the value today of all the flows, each discounted at the rate you require. Zero or more means the project earns at least that rate. IRR is the rate at which NPV is exactly zero: the return the flows themselves give, per period. With yearly flows it is a yearly rate; with monthly flows, a monthly one.

Why a spreadsheet gives another NPV

A spreadsheet's NPV() treats its first value as one period away. With the initial investment inside the range, every flow is discounted one period too many. Enter the initial flow outside: =NPV(rate, CF1:CFn) + CF0. The table under the keys shows the number the wrong version gives for your flows.

When there is no IRR, or more than one

IRR needs money going both ways: at least one negative and one positive flow. If the signs change more than once (an investment, income, then a large cost), there can be two IRRs or none, and the calculators stop at the first one they find or report an error. NPV at your rate is the safer number then.

Common questions

How many cash flows can I enter?

This page takes up to 20 flows after CF0, each repeated up to 99 times, which is what the HP 12C holds. The BA II Plus and the HP 10bII+ hold more.

The calculator shows the IRR as a percent per period. How do I make it yearly?

With yearly flows, it already is. With monthly flows, the yearly nominal rate is the monthly IRR × 12, and the effective rate is (1 + IRR)^12 − 1.

Related

How we checked this page: every display above comes from replaying the keys on a tested engine, and the final answer is compared with an independent formula. How we check every answer.