Corporate Finance & Valuation Capital Budgeting & Project Appraisal Excel XIRR convention (actual/365 day count)

XIRR Calculator for Irregular Dated Cash Flows

XIRR is the annualized rate that makes a set of dated cash flows worth exactly zero today. Unlike ordinary IRR it does not assume your money moves in neat yearly or monthly steps — it measures the actual number of days between each flow, so a contribution made on 12 March and a withdrawal on 4 November are weighted by the time they were really invested. Enter up to five signed amounts with their dates and this calculator solves for the rate, using the same actual/365 convention Excel's XIRR function uses. Use it for staggered investments, capital calls, drawdown pensions, property deals, and any account where you added or took out money at unpredictable times.

Calculator

This calculator runs in your browser. Enable JavaScript for live results — the inputs, formula and worked example below remain fully readable without it.

Inputs this calculator takes, with typical values
InputWhat to enterExample
Date of cash flow 1Enter the date in YYYY-MM-DD form; this is normally the day you first put money in.2023-01-15
Amount of cash flow 1Money you pay in is negative; money you receive is positive.-10000 $
Date of cash flow 2Enter the date in YYYY-MM-DD form; dates may be in any order.2023-06-01
Amount of cash flow 2Set to zero to leave this slot unused; a zero amount is ignored entirely.-5000 $
Date of cash flow 3Enter the date in YYYY-MM-DD form.2024-02-20
Amount of cash flow 3Set to zero to leave this slot unused.2000 $
Date of cash flow 4Enter the date in YYYY-MM-DD form.2024-11-05
Amount of cash flow 4Set to zero to leave this slot unused.3000 $
Date of cash flow 5Enter the date in YYYY-MM-DD form; for an open position use today's date and enter the current value as the amount.2025-09-30
Amount of cash flow 5For a position you still hold, enter its current market value here as a positive amount.12000 $

It returns

  • XIRR (annualized) — The annual rate that discounts every dated flow back to a net present value of zero.
  • Total paid in
  • Total received
  • Net gain
  • Holding period
  • Simple (non-annualized) return — Net gain divided by total paid in, ignoring timing entirely.

The formula

0=i=0nCFi(1+r)did0365
growth=(1+r)dnd0365

In plain text: 0 = Σ CFᵢ / (1 + r)^((dᵢ − d₀) / 365)

  • rXIRR — the annualized money-weighted rate of return (decimal)
  • CFᵢSigned cash flow: negative when you pay in, positive when you receive ($)
  • dᵢCalendar date of cash flow i (date)
  • d₀Date of the earliest cash flow, used as the discounting anchor (date)

There is no closed-form solution; the rate is found numerically by bisection. The exponent uses the actual number of days divided by a fixed 365, matching Excel's XIRR.

Updated Category Capital Budgeting & Project Appraisal Verified against published test cases Reading time 9 min

What XIRR measures and why dates matter

XIRR answers one question: what constant annual rate, compounded continuously through the calendar, would have turned your actual payments into your actual receipts? It is a money-weighted return, which means a dollar invested for three years counts three times as heavily as a dollar invested for one year.

That weighting is exactly what ordinary IRR cannot do. IRR assumes every cash flow lands at a regular interval — end of year 1, end of year 2, and so on. Real accounts do not behave that way. You top up a brokerage account in February, sell part of a holding in September, get a dividend in December. Feeding those into a periodic IRR forces you to pretend they all happened at period ends, and the error grows with how uneven the timing is.

The convention this calculator follows is Excel's: the exponent for each flow is the actual number of days since the first flow, divided by 365. Leap years are not treated specially — 366 real days simply produce an exponent of 366/365. That is a simplification, and it is the one every spreadsheet, portfolio system and fund administrator you will ever compare against also makes, which is worth far more than a marginally more accurate day count nobody else uses.

How the equation is solved

The defining equation sets net present value to zero. Each cash flow is divided by (1 + r) raised to the number of years, fractional, that separate it from the first flow. Because r appears in a fractional exponent in several terms at once, there is no algebraic solution for anything beyond two cash flows; the rate has to be found numerically.

This calculator brackets the answer between −99.99% and +10,000% and bisects until the present value is essentially zero. Bisection is slower than the Newton iteration Excel uses, but it cannot diverge and it does not need a starting guess, which is why an initial guess field is not offered here. If no rate in that very wide bracket works, the calculator says so rather than returning a plausible-looking wrong number.

Two conditions must hold for a solution to exist at all. First, at least one flow must be negative and at least one positive; a list of payments with no receipts has no rate of return. Second, the flows must not all share a single date, because annualizing across zero elapsed time is undefined. When cash flows change sign more than once — you invest, withdraw everything, then invest again — the polynomial can have several real roots, and the calculator flags that rather than pretending its answer is unique. The modified IRR is the standard escape from multiple roots because it collapses the problem to a single sign change by construction.

Worked example: a staggered $15,000 investment

You put $10,000 into a private deal on 15 January 2023, add $5,000 on 1 June 2023, take a $2,000 distribution on 20 February 2024, another $3,000 on 5 November 2024, and receive $12,000 on final exit on 30 September 2025. Those are the calculator's defaults.

  1. Convert dates to day counts from the first flow. 15 Jan 2023 is day 0. 1 Jun 2023 is 137 days later (16 remaining days of January + 28 + 31 + 30 + 31 + 1). 20 Feb 2024 is day 401. 5 Nov 2024 is day 660. 30 Sep 2025 is day 989.
  2. Write the equation. −10,000 − 5,000/(1+r)137/365 + 2,000/(1+r)401/365 + 3,000/(1+r)660/365 + 12,000/(1+r)989/365 = 0.
  3. Bracket and bisect. At r = 0 the left side is 15,000 paid in against 17,000 received, so the expression is +2,000 — positive. At r = 50% the discounting is severe enough to drive it negative. The root therefore lies between them.
  4. Read the answer. The solver returns roughly 5.8% a year. The result panel above shows the exact figure, and the schedule table shows each flow's discount factor and present value; those present values sum to zero, which is the definition being satisfied.
  5. Compare with the simple return. Net gain is 17,000 − 15,000 = $2,000 on $15,000 paid in, or 13.33%. Spread across a holding period of 989 days — 2.71 years — a simple 13.33% is consistent with a single-digit annual rate. Whenever the annualized figure and the simple figure disagree in that direction, the money was invested for longer than a year.

How to read your XIRR

Compare XIRR against the return you could have got elsewhere over the same period, not against a headline index number. Because XIRR is money-weighted, it rewards you for having had more capital deployed when returns were good — which is partly skill and partly luck of timing. A fund manager is normally judged on a time-weighted return instead, precisely because they do not control when investors add money.

Three sanity checks catch most errors. First, the sign: if net gain is positive over a period longer than a day, XIRR must be positive too, and if it is not you have a date entered wrongly. Second, the magnitude: for holding periods under a month, annualizing multiplies a small percentage into a large one, and a 2% gain over 10 days annualizes to over 100% without meaning anything. Third, the direction against simple return: over a period longer than a year the annualized rate should be smaller in magnitude than the simple return, and over a period shorter than a year it should be larger. Both statements follow from compounding and hold for gains and losses alike.

For a project appraisal rather than a portfolio, remember that a rate on its own decides nothing. Pair XIRR with net present value at your actual cost of capital, and with the profitability index if your capital budget is constrained.

What a given total gain annualizes to, by holding period

XIRR for a single payment in and a single payment out, at the stated total gain and elapsed days. Each cell is (1 + gain)^(365 ÷ days) − 1.
Total gain90 days182 days365 days730 days1,825 days
+5%21.88%10.28%5.00%2.47%0.98%
+10%47.19%21.06%10.00%4.88%1.92%
+25%147.18%56.44%25.00%11.80%4.56%
+50%417.67%125.49%50.00%22.47%8.45%
−10%−34.77%−19.05%−10.00%−5.13%−2.09%
−25%−68.86%−43.83%−25.00%−13.40%−5.59%

Read across a row to see how the same total gain looks under annualization. The 365-day column always equals the total gain, which is the check that the table is right.

Mistakes that produce a wrong XIRR

  • Getting the signs the wrong way round. Money leaving your pocket is negative. If every amount is positive there is no solution, and if you flip all of them the rate is unchanged — which means a consistent sign flip hides the error rather than exposing it.
  • Forgetting the closing value. For a position you still hold, the last row must be today's date with today's market value as a positive amount. Omit it and XIRR reports the return on a position you have implicitly written down to zero.
  • Annualizing a very short period. Two weeks of results tell you almost nothing about an annual rate. Read the simple return for short holds.
  • Comparing XIRR to a fund's published return. Published fund returns are time-weighted and deliberately strip out the effect of investor timing. Your XIRR and the fund's stated return will differ whenever you added or withdrew money, and neither is wrong.
  • Assuming a unique answer when signs alternate. Invest, fully exit, reinvest, exit again, and the equation can have more than one root. The calculator warns when this is possible.
  • Entering dates in a local format. Use YYYY-MM-DD. 03-04-2024 is ambiguous and this calculator will not guess.

XIRR, IRR and time-weighted return

Three return measures get confused with each other constantly. IRR solves the same zero-NPV equation but on evenly spaced periods; it is the right tool for a project modelled in annual or quarterly columns. XIRR is IRR with real dates, and reduces to IRR exactly when the dates happen to be a year apart. Time-weighted return chains sub-period returns together and is deliberately insensitive to the size and timing of contributions, which is why it is the standard for reporting manager performance under the Global Investment Performance Standards.

Use XIRR when you want to know what you earned, IRR when the cash flows are genuinely periodic, and a time-weighted return when you want to judge an investment decision independently of when you funded it. For a project that also needs a payback answer, pair this with discounted payback; when the reinvestment assumption embedded in IRR is doing too much work, the MIRR makes it explicit. And if you are appraising a corporate project rather than a portfolio, the rate you compare against should be your weighted average cost of capital.

Why the day count is 365 and not 365.25

Excel's XIRR divides actual elapsed days by a fixed 365, and every mainstream implementation copies it. Over a two-year span containing one leap day, that convention treats 731 days as 2.0027 years rather than 2.0000, which shifts the reported rate by a few thousandths of a percentage point. It is a real approximation, but changing it would make your result disagree with every spreadsheet anyone checks it against, so this calculator keeps the convention and names it.

Frequently asked questions

What is the difference between XIRR and IRR?

XIRR uses the actual calendar dates of each cash flow; IRR assumes the flows are evenly spaced. If your cash flows really do fall exactly one year apart, the two give the same answer. As soon as the spacing is uneven, IRR silently mis-weights the flows and XIRR does not. Excel keeps both functions for exactly this reason.

Why does my XIRR look enormous?

Almost always because the holding period is short. Annualizing turns a 3% gain over three weeks into about 67% a year — 1.03^(365÷21) − 1 — since it assumes the same rate repeats for the rest of the year. Read the simple return alongside it, and treat annualized rates on periods under a couple of months as arithmetic rather than information.

How do I include an investment I still own?

Add a final row dated today with the current market value entered as a positive amount. XIRR treats it as though you sold at that price. Without it, the calculation assumes the position ended worthless and the rate will be badly negative.

Can XIRR be negative?

Yes. A negative XIRR means you received back less, in present-value terms, than you paid in. The floor is −100%, which corresponds to losing everything. This calculator searches down to −99.99% and will report a negative rate normally.

Does the order I enter the cash flows matter?

No. The calculator sorts them by date before solving, so you can enter them in any order. What matters is that each amount is paired with the correct date and carries the correct sign.

Why do I get no result when all my amounts are positive?

Because there is no rate that makes a stream of receipts with no payments net to zero. A rate of return needs both an outlay and a return. Check that the money you paid in is entered as a negative number.

Is XIRR the same as CAGR?

Only in the special case of one payment in and one payment out. CAGR compounds a single beginning value to a single ending value, so it cannot handle intermediate contributions or withdrawals. XIRR generalises it to any number of dated flows and gives an identical answer when there are just two.

What counts as a good XIRR?

It depends entirely on the risk you took and the alternative you gave up. A useful reference point is your own cost of capital or the return on a comparable liquid investment over the same dates. For an illiquid private deal, an XIRR that merely matches a public index is usually a poor outcome once the illiquidity is priced in.

References