IRR & NPV Calculator Guide: How to Value Cash FlowsIRR 与 NPV 计算器指南:如何评估投资现金流的价值
Whether you're evaluating a stock, a rental property, or a business acquisition, the question is the same: is this investment actually worth what it costs? Two numbers answer it — Net Present Value (NPV) and Internal Rate of Return (IRR). They sound academic, but the math is the same one your savings account uses to decide what future dollars are worth today. This guide makes the formulas concrete, walks through a real example, and warns about the pitfalls that trip up most first-time users.
What Is NPV?
Net Present Value is the sum of all cash flows from an investment — inflows and outflows — each discounted back to today's dollars. If you invest $100,000 today and receive $30,000 a year for 5 years, the NPV tells you whether the total received is more, less, or exactly equal to the $100,000 you put up, after accounting for the time value of money.
- CFt — cash flow at time t (positive = inflow, negative = outflow)
- r — discount rate (your required return)
- t — time period (typically years)
NPV > 0 → accept. NPV < 0 → reject. NPV = 0 → indifferent.
The discount rate r is your opportunity cost — what you'd earn on an equivalent-risk investment. For a stock you might use 8% (the long-run S&P 500 return). For a real estate investment, perhaps 5%. The higher r, the less future cash flows matter today.
Worked Example: A Rental Property
You buy a rental property for $200,000, putting 25% down and borrowing the rest. Over the next 5 years you collect net rental income (after mortgage, taxes, maintenance) of $12,000/year, then sell for $240,000 after paying off the mortgage. What discount rate makes this worthwhile?
Cash flows from your pocket (assuming you paid $50,000 down):
Year 0: −$50,000 (down payment + closing)
Year 1: +$12,000
Year 2: +$12,000
Year 3: +$12,000
Year 4: +$12,000
Year 5: +$12,000 + ($240,000 − mortgage balance) ≈ +$170,000
Discount at 8%:
NPV = −50,000 + 12,000/1.08 + 12,000/1.08² + 12,000/1.08³ + 12,000/1.08⁴ + 170,000/1.08⁵
= −50,000 + 11,111 + 10,288 + 9,526 + 8,820 + 117,892
≈ $107,637
That's positive — meaning at an 8% required return, this deal is worth about $107K more than it costs. Run the same numbers at a 15% discount rate and you'll see NPV drop sharply. Higher required return → fewer deals look attractive.
What Is IRR?
IRR is the discount rate that makes NPV exactly zero. In plain terms: what rate of return is this investment actually delivering? If your NPV is positive at 8% and negative at 15%, the IRR is somewhere in between — the rate at which the deal "breaks even."
There's no closed-form formula; IRR is solved iteratively (Newton-Raphson or trial-and-error in a spreadsheet). The decision rule:
- IRR > your required return → accept.
- IRR < your required return → reject.
In the rental example above, IRR works out to about 22% — meaning the deal earns 22% per year on your money, far above an 8% hurdle. That tracks with the NPV we computed.
When IRR Lies — Five Pitfalls
IRR is popular but treacherous. Five situations where it can mislead you:
- Multiple IRRs. If cash flows change sign more than once (e.g., a project that requires reinvestment in year 5), the math has multiple mathematical solutions — and Excel will pick the wrong one. Use NPV instead.
- Ignores project size. A $1,000 investment returning 100% IRR is a $1,000 gain. A $1,000,000 investment returning 20% IRR is a $200,000 gain. IRR alone doesn't tell you which deal is better — NPV does.
- Reinvestment assumption. IRR assumes interim cash flows are reinvested at the IRR. NPV assumes reinvestment at the discount rate. The NPV assumption is more realistic for most projects.
- No risk adjustment. A 20% IRR on a guaranteed Treasury is fantastic; a 20% IRR on a startup is mediocre once you weight the probability of failure.
- Doesn't handle timing well. Two investments can have the same IRR but vastly different cash-flow profiles. Always look at the year-by-year numbers.
For business and real-estate decisions, NPV is the more reliable metric. Use IRR for quick ranking and to communicate with non-technical stakeholders ("this deal returns 18%") — but never let IRR be the final word.
How to Pick the Discount Rate
The hardest part of NPV isn't the formula — it's choosing r. Three common approaches:
| Method | Discount rate | Best for |
|---|---|---|
| WACC (weighted average cost of capital) | Mix of debt and equity cost | Business projects |
| Opportunity cost | Return you'd earn elsewhere at similar risk | Personal investments |
| Hurdle rate | A fixed number your firm requires (e.g., 15%) | Corporate budgeting |
For personal decisions, the rule of thumb: pick the return you could earn in a low-cost index fund (historically 7–10% real), and add a risk premium for anything less liquid or more uncertain (real estate: +2%, startup: +10%+).
Try It
Use the IRR & NPV Calculator to:
- Model a real-estate deal — enter your down payment, expected rental income, and projected sale price.
- Sweep the discount rate from 5% to 20% and watch NPV cross zero — that's the IRR.
- Compare two competing investments at the same discount rate to see which has higher absolute NPV (often not the one with higher IRR!).
The calculator accepts any cash-flow pattern, solves IRR with Newton-Raphson, and shows the full NPV curve across a range of discount rates.