Calcs.finance

investment calculator

IRR Calculator

The IRR Calculator solves the annual rate that makes the entered signed cash-flow timeline have a net present value near zero. It supports a fixed recurring cash-flow mode for one starting investment, recurring deposits or withdrawals, and an ending balance, plus an irregular annual cash-flow mode for a time-zero investment and year-end cash flows.

Your scenario

Enter your numbers

Help
IRR method
Periodic cash flow type
Periodic cash flow frequency
Periodic cash flow timing

Result

Result summary
Internal rate of return is 29.77% for the fixed cash-flow scenario.
Internal rate of return
29.77%
NPV at IRR
$0.00
Total cash in
$18,000.00
Total cash out
$10,000.00
Net cash flow
$8,000.00
Holding years used
2.5
Cash flow count
32
What this means
IRR is a money-weighted annual return and can be misleading when cash-flow signs change more than once.

Working scenario

New scenario

Not saved yet

Compare

Saved scenarios

Compare saved versions

Compare

Save this result, then use saved scenarios to switch between assumptions.

How the IRR Calculator works

Use this calculator when cash-flow timing matters and a simple start-to-end ROI is too limited. Use fixed recurring cash-flow mode for one repeated deposit or withdrawal pattern plus an ending balance. Use irregular annual cash-flow mode for project-style year-end cash flows. Use ROI for a simpler amount-invested and amount-returned comparison, Average Return for period returns or account cash-flow weighting, Payback Period for recovery timing, and Investment for fixed-return contribution projections.

The calculator builds a signed timeline where outflows are negative and inflows are positive. Fixed mode converts Holding years plus Holding months divided by 12 into total holding years, maps the selected frequency to periods per year, rounds the recurring period count, records the initial investment at time zero, records deposits as recurring outflows or withdrawals as recurring inflows at the selected beginning or end timing, and records ending balance at the holding date. Irregular mode records Irregular initial investment at time zero and each non-zero annual cash-flow field at the end of that year. The app then searches annual rates from -99.99 percent to 1000 percent for the first NPV sign change, bisects that bracket, and reports IRR, NPV at IRR, total cash in, total cash out, net cash flow, holding years used, and cash-flow count.

IRR Calculator formula

This formula page covers the app's IRR Calculator: a signed cash-flow model that solves for the annual discount rate where net present value is zero. The calculator supports a fixed recurring cash-flow mode and an irregular annual cash-flow mode. It reports IRR, NPV at the solved IRR, total cash in, total cash out, net cash flow, holding years used, and cash-flow count. It does not model dated XIRR schedules, MIRR, taxes, inflation, project risk, or provider-specific investment performance reporting.

NPV(r) = sum(CF_i / (1 + r)^t_i); IRR = r where NPV(r) = 0; T = HY + HM / 12; N = round(T * F); NCF = TCI - TCO

Each modeled cash flow has a signed amount and a time in years. The calculator discounts those cash flows at candidate annual rates, searches for the first practical rate that makes NPV cross zero, then summarizes the cash-flow totals.
SymbolMeaningHow this page uses it
CF_iCash flow iA signed cash flow. Outflows such as initial investments and deposits are negative; inflows such as withdrawals and ending balance are positive.
t_iTime of cash flow iThe cash-flow timing in years from time zero. Fixed mode can use fractional years; irregular mode uses year-end values.
rCandidate annual rateThe annual discount rate being tested in the NPV equation.
IRRInternal rate of returnThe annual rate where the modeled cash-flow NPV is zero, expressed as a percentage.
HYHolding yearsThe fixed-mode Holding years input.
HMHolding monthsThe fixed-mode Holding months input divided by 12 when forming the timeline.
TTotal holding yearsHolding years plus holding months divided by 12. The ending balance is placed at this time.
FPeriods per yearThe selected fixed-mode cash-flow frequency: 1 annual, 2 semiannual, 4 quarterly, 12 monthly, 24 semimonthly, 26 biweekly, or 52 weekly periods.
NRecurring period countThe rounded number of recurring cash-flow periods in fixed mode: total holding years times periods per year.
APeriodic cash-flow amountThe full recurring amount entered in fixed mode before the calculator applies the deposit or withdrawal sign.
BEnding balanceThe fixed-mode ending balance, treated as a positive inflow at the holding date.
I_0Initial investmentThe initial fixed-mode investment or irregular-mode initial investment, treated as a time-zero outflow.
Y_iAnnual cash flow iThe irregular-mode year i cash flow. Non-zero entries are treated as end-of-year project cash flows.
TCITotal cash inThe sum of all positive cash flows.
TCOTotal cash outThe absolute value of the sum of all negative cash flows.
NCFNet cash flowTotal cash in minus total cash out.
HHolding years usedThe latest cash-flow time in the modeled schedule.
CCash-flow countThe number of non-zero cash flows included in the solve.

Step by step

  1. Build a signed cash-flow timeline. Negative values are outflows from the investor or project, and positive values are inflows.
  2. In fixed cash-flow mode, calculate total holding years as holding years plus holding months divided by 12.
  3. Map the selected recurring frequency to periods per year, then round total holding years times periods per year to get the recurring period count.
  4. Record the initial investment as a time-zero negative cash flow.
  5. Record the ending balance as a positive cash flow at the total holding years time.
  6. For each recurring period in fixed mode, record deposits as negative cash flows and withdrawals as positive cash flows.
  7. Place beginning-of-period recurring cash flows at (period - 1) divided by periods per year; place end-of-period recurring cash flows at period divided by periods per year.
  8. In irregular annual cash-flow mode, record the irregular initial investment as a time-zero outflow.
  9. Record each non-zero annual cash-flow field as an end-of-year cash flow at year 1 through year 50.
  10. Sort the non-zero cash flows by time before solving.
  11. Calculate NPV at a candidate annual rate by discounting each cash flow with CF_i divided by (1 + r) raised to t_i and summing the results.
  12. If the cash-flow list does not include at least one positive and one negative amount, return 0 because an IRR solve is not meaningful for one-sided flows.
  13. Scan annual rates from -99.99 percent to 1000 percent across 2000 steps and look for the first sign change in NPV.
  14. When a sign change is found, bisect that bracket for 140 iterations and report the midpoint as the IRR.
  15. If no bracket is found, fall back to the app's annualized cash-flow solve.
  16. Calculate NPV at the solved IRR, total cash in, total cash out, net cash flow, holding years used, and cash-flow count from the same timeline.
  17. Round displayed currency and percentage outputs after the full-precision solve.

Worked example

Default examples: fixed monthly withdrawals and irregular annual flows

The default fixed-mode example starts with a $10,000 initial investment, a $15,000 ending balance after 2 years and 6 months, and $100 monthly withdrawals at the end of each month. The irregular-mode example starts with a $50,000 initial investment, then uses -$10,000 in year 1, $30,000 in year 2, and $50,000 in year 3.

  1. Fixed mode converts 2 years and 6 months to 2.5 holding years.
  2. Monthly frequency gives 12 periods per year, so the recurring period count is 30.
  3. The fixed-mode timeline contains 32 non-zero cash flows: the $10,000 initial outflow, 30 monthly $100 withdrawal inflows, and the $15,000 ending-balance inflow.
  4. Total cash in is $18,000: $3,000 of withdrawals plus the $15,000 ending balance.
  5. Total cash out is $10,000, so net cash flow is $8,000.
  6. Solving the NPV-zero equation reports a 29.77 percent IRR and $0 NPV at IRR after display rounding.
  7. Irregular mode records the $50,000 initial investment as the time-zero outflow.
  8. The non-zero annual cash flows are -$10,000 at the end of year 1, $30,000 at the end of year 2, and $50,000 at the end of year 3.
  9. The irregular timeline contains 4 non-zero cash flows, with 3 holding years used.
  10. Total cash in is $80,000, total cash out is $60,000, and net cash flow is $20,000.
  11. Solving the irregular annual timeline reports a 12.45 percent IRR and $0 NPV at IRR after display rounding.

IRR is driven by both amount and timing. The same total cash in and out can produce a different annual rate when cash flows arrive earlier, later, or change sign more than once.

Assumptions and what this calculator ignores

Geographic scope: works globally. The math is currency-agnostic, so enter amounts in your own currency; local taxes, fees, and product rules are not included.

What this formula does not include

Common mistakes to avoid

Key terms

Internal rate of return
The annual rate where the modeled cash-flow NPV is zero. It is a money-weighted rate from the entered timeline, not a forecast or provider return.
NPV at IRR
The net present value recalculated at the solved IRR. A value near zero is the internal check that the selected rate balances the modeled inflows and outflows.
Signed cash-flow timeline
The ordered list of negative outflows and positive inflows used in the solve. Changing the sign, amount, or timing of any cash flow can change the IRR materially.

Frequently asked questions

What does the IRR output actually tell me?

IRR is the annual discount rate at which your entered cash flows exactly break even - where net present value equals zero. It is money-weighted: both the size and the timing of each flow matter, so receiving cash earlier raises IRR even when totals match. The calculator reports NPV at the solved rate (which should be near zero), total cash in and out, and the timeline it used.

Should I use fixed cash-flow mode or irregular mode?

Fixed mode fits a repeating pattern: one initial investment, one recurring deposit or withdrawal at a chosen frequency and timing, and one ending balance - the default example is $10,000 invested, $100 withdrawn monthly, $15,000 back after 2.5 years. Irregular mode takes up to 50 signed annual amounts for uneven timelines like a rental property or business. Sign convention matters: money out is negative, money in positive.

Why does IRR disagree with the simple ROI on the same investment?

ROI compares two totals and ignores time; IRR prices every flow by when it happened. A 50 percent total gain is a very different annual rate over 2 years versus 10, and interim deposits or withdrawals shift IRR while leaving simple ROI's inputs untouched. When flows change sign more than once, IRR can also have multiple solutions - the NPV-at-IRR output helps confirm the solver landed sensibly.

Methodology, sources, and disclaimer

This calculator is an original NPV-root solver with a fixed recurring cash-flow mode and an irregular mode accepting up to 50 signed annual amounts, validated by deterministic fixtures covering sign conventions and multi-root edge cases. It is not copied from a single source.

Fixtures pin the solved rate and the near-zero NPV-at-IRR check for both modes, including sign-flip timelines. The result remains an educational estimate, not audited investment performance or a product return.

Formula version 2026.05.22-generic-irr. The version marks the calculation logic and validation fixture set used for this estimate.

Results are educational estimates, not advice. Read the full disclaimer.

Related reading

When another calculator fits better

investment

Average Return Calculator

Estimate annualized return from account cash flows or from several holding-period returns.

investment

ROI Calculator

Estimate return on investment, gain or loss, and annualized return from investment amounts and time held.

investment

Payback Period Calculator

Estimate simple and discounted payback periods for an investment with recurring annual cash flow.

investment

Investment Calculator

Solve an investment goal from starting amount, end amount, return rate, contribution amount, and investment length.

investment

Present Value Calculator

Discount a future lump sum or a stream of equal periodic deposits back to today's value.

investment

Finance Calculator

Solve one time-value-of-money variable from periods, rate, present value, periodic payment, and future value.