XIRR Calculator
Annualized money-weighted return for cash flows on irregular dates
XIRR is the annual rate of return that makes the present value of dated cash flows equal zero, with each amount discounted by (1 + r) raised to the number of days since the first date divided by 365, the same convention as Excel's XIRR function. Enter deposits as negative amounts and withdrawals plus the current value as positive amounts. Nine 401(k) deposits of $32,500 worth $37,525 on September 30, 2026 give an XIRR of 9.97% a year.
Last updated October 2026
Method: Excel's XIRR convention. Each cash flow is discounted by (1 + r)days / 365, counting actual days from the first date, and XIRR is the rate at which the total (XNPV) is zero. It is solved with Newton's method from a 10% guess, with a bisection fallback that also finds additional rates. Checked against Microsoft's documented example: 37.34%, and an XNPV of $2,086.65 at 9%.
Included: Unlimited dated rows in any order, pasting from a spreadsheet, XIRR, XNPV at your rate, warnings for multiple or missing solutions, the simple return, a CAGR on totals, plain IRR per row and a discount-factor schedule.
Not included: Taxes, the time-weighted return (it needs the account value on every cash-flow date), MIRR, inflation and risk measures. Results describe past cash flows and are not investment advice.
📆 Dated cash flows
Negative = money you put in (deposits, purchases). Positive = money you get back (withdrawals, cash dividends) and the current value on its date. Rows can be in any order.
Paste from a spreadsheet or statement
A positive XNPV means the cash flows beat this rate.
📆 XIRR: annualized money-weighted return
⚖️ Same cash flows, four measures
Each amount counts from its own date. This is the money-weighted return.
Net gain divided by money in. Ignores how long the money was invested.
Treats all money as invested on the first date and paid out on the last, as the CAGR Calculator does.
Treats the rows as exactly one period apart and ignores the dates, like the IRR Calculator.
When deposits are spread over time, the CAGR on totals usually pulls the result toward zero, because it treats every dollar as invested from the first day.
📋 Cash-flow schedule with discount factors
| Date | Days | Years | Cash flow | Factor at XIRR | PV at XIRR | PV at 8% |
|---|---|---|---|---|---|---|
| Feb 15, 2024 | 0 | 0.0000 | -$2,500.00 | 1.0000 | -$2,500.00 | -$2,500.00 |
| Mar 28, 2024 | 42 | 0.1151 | -$4,000.00 | 0.9891 | -$3,956.51 | -$3,964.73 |
| Jun 28, 2024 | 134 | 0.3671 | -$3,000.00 | 0.9657 | -$2,897.18 | -$2,916.42 |
| Sep 30, 2024 | 228 | 0.6247 | -$3,000.00 | 0.9424 | -$2,827.15 | -$2,859.19 |
| Dec 20, 2024 | 309 | 0.8466 | -$3,500.00 | 0.9227 | -$3,229.54 | -$3,279.23 |
| Mar 31, 2025 | 410 | 1.1233 | -$3,000.00 | 0.8988 | -$2,696.36 | -$2,751.55 |
| Sep 30, 2025 | 593 | 1.6247 | -$3,000.00 | 0.8570 | -$2,570.94 | -$2,647.40 |
| Dec 19, 2025 | 673 | 1.8438 | -$4,500.00 | 0.8393 | -$3,776.95 | -$3,904.67 |
| Jun 30, 2026 | 866 | 2.3726 | -$6,000.00 | 0.7982 | -$4,789.21 | -$4,998.62 |
| Sep 30, 2026 | 958 | 2.6247 | $37,525.00 | 0.7793 | $29,243.84 | $30,661.60 |
| Total (XNPV) | $0.00 | $839.79 | ||||
Factor = (1 + XIRR)−years, with years = days since the first cash flow ÷ 365. At the XIRR the present values add up to zero, which is the definition of the rate. Each row is rounded to the cent; totals use unrounded values.
XIRR calculator: the true annual return when the dates are uneven
An XIRR calculator finds the annual rate of return for cash flows that happen on irregular dates. It solves 0 = Σ P / (1 + r)^(days / 365) for r, exactly like Excel's XIRR function, where days counts from the first cash flow. The examples below show how the rate is found, how it compares with IRR and CAGR on the same money, and where an annualized figure can mislead.
XIRR is the money-weighted return: each dollar counts for as long as it was invested. For cash flows spaced exactly 365 days apart the IRR Calculator gives the same answer, and for a single start and end value the CAGR Calculator does. Use this page whenever the dates are uneven.
The XIRR and XNPV formulas
XNPV(r) = ∑ Pi / (1 + r)(di − d1) / 365 XIRR = the rate r for which XNPV(r) = 0 Pi is each cash flow, di its date and d1 the first date. Money you put in is negative; money you take out, including the current value treated as if you sold today, is positive. Microsoft's documentation states that all payments are discounted on a 365-day year. The first date only sets the reference point: moving it scales the XNPV but never changes the XIRR. Because r sits in an exponent there is no algebraic solution, so the calculator starts Newton's method at Excel's default guess of 10% and falls back to bisection if Newton fails.
Worked example 1: a 401(k) with irregular contributions
A saver's 401(k) statement shows nine deposits on uneven dates: payroll contributions, a bonus deferral in March 2024, a pause during a leave in spring 2025 and a larger deposit in June 2026. They total $32,500, and the balance on September 30, 2026 is $37,525. The gain of $5,025 is a simple return of 15.46%, but that ignores time: the first $2,500 was invested for 958 days and the last $6,000 for only 92.
XIRR settles it at 9.97% per year. Weighted by dollars, the deposits were invested for an average of 1.48 years of the 2.62-year span, so the annual rate sits well below the simple return but far above the 5.63% you get by pretending all $32,500 went in on February 15, 2024. At an 8% hurdle rate the XNPV is +$839.79, so the account beat 8%. This is the calculator's default example.
The cash-flow schedule with discount factors
Every row of the 401(k) example, discounted at the XIRR and at the 8% hurdle rate. At the XIRR the present values add up to zero, which is the definition of the rate; at 8% they add up to the XNPV.
| Date | Days | Years | Cash flow | Factor at XIRR | PV at XIRR | PV at 8% |
|---|---|---|---|---|---|---|
| Feb 15, 2024 | 0 | 0.0000 | -$2,500.00 | 1.0000 | -$2,500.00 | -$2,500.00 |
| Mar 28, 2024 | 42 | 0.1151 | -$4,000.00 | 0.9891 | -$3,956.51 | -$3,964.73 |
| Jun 28, 2024 | 134 | 0.3671 | -$3,000.00 | 0.9657 | -$2,897.18 | -$2,916.42 |
| Sep 30, 2024 | 228 | 0.6247 | -$3,000.00 | 0.9424 | -$2,827.15 | -$2,859.19 |
| Dec 20, 2024 | 309 | 0.8466 | -$3,500.00 | 0.9227 | -$3,229.54 | -$3,279.23 |
| Mar 31, 2025 | 410 | 1.1233 | -$3,000.00 | 0.8988 | -$2,696.36 | -$2,751.55 |
| Sep 30, 2025 | 593 | 1.6247 | -$3,000.00 | 0.8570 | -$2,570.94 | -$2,647.40 |
| Dec 19, 2025 | 673 | 1.8438 | -$4,500.00 | 0.8393 | -$3,776.95 | -$3,904.67 |
| Jun 30, 2026 | 866 | 2.3726 | -$6,000.00 | 0.7982 | -$4,789.21 | -$4,998.62 |
| Sep 30, 2026 | 958 | 2.6247 | $37,525.00 | 0.7793 | $29,243.84 | $30,661.60 |
| Total (XNPV) | $0.00 | $839.79 | ||||
Years = days ÷ 365. Factor = (1 + 0.099657)−years. Present values use the unrounded factors, so multiplying the four-decimal factor can differ by a cent.
Worked example 2: one deposit, one final value
With a single deposit and a single final value, XIRR is a CAGR measured in 365-day years. $10,000 invested on June 1, 2023 and worth $13,000 on June 1, 2026 spans 1,096 days, because the period includes February 29, 2024: that is 3.0027 years. XIRR = 1.3365 / 1,096 − 1 = 9.13%, while the textbook CAGR over exactly three years, 1.31/3 − 1, is 9.14%. Neither is wrong; they use different day counts, and the 365-day convention is the one Excel and this calculator share.
Money-weighted vs time-weighted return
Funds report a time-weighted return, which chains the return of each sub-period and ignores when investors added money. Your XIRR is money-weighted: it depends on how much of your money was invested during the good and the bad stretches. An investor deposits $10,000 on December 31, 2024. By June 30, 2025 the account is up 20%, to $12,000, and the investor adds $20,000. The second half brings a 10% loss, leaving $28,800 on December 31, 2025.
The time-weighted return is 1.20 × 0.90 − 1 = 8.00%, yet the investor ends with $28,800 on $30,000 of deposits, an XIRR of −5.93%. Reverse the two half-year returns and the same deposits end at $34,800, an XIRR of 24.57%, while the time-weighted return stays 8.00%. That gap is why a 401(k) statement's personal rate of return can differ from its funds' published returns. Under the Department of Labor's participant disclosure rule, plans report each investment's average annual total return for 1-, 5- and 10-year periods, the compounded rate that grows an initial investment to its ending value: a fund-level figure, not your money-weighted result.
How precise do the dates need to be?
You rarely need every paycheck. To test the shortcuts, take a 401(k) that received $400 every other Friday from January 3, 2025 to September 25, 2026 (46 deposits, $18,400) and grew at exactly 8.00% a year, reaching $19,699.46 on September 30, 2026. Each row below adds that final value to the deposits as listed:
| How the deposits are entered | Deposit rows | XIRR |
|---|---|---|
| Every paycheck on its own date | 46 | 8.00% |
| Monthly totals dated the 15th | 21 | 7.96% |
| Quarterly totals dated mid-quarter (Feb 15, May 15, Aug 15, Nov 15) | 7 | 8.02% |
| Quarterly totals dated the first day of the quarter | 7 | 7.02% |
| Quarterly totals dated the last day of the quarter | 7 | 9.37% |
| Yearly totals dated December 31 (2026 on the statement date) | 2 | 17.05% |
| Everything on the first date (CAGR on totals) | 1 | 4.00% |
Totals dated in the middle of each month or quarter land within a few hundredths of a point. Dating them at the end of the period makes the money look invested for less time and inflates the result; dating them at the start does the opposite.
How to use this calculator
- Enter each cash flow with its date and amount. Deposits, purchases and contributions are negative; withdrawals, cash dividends and sale proceeds are positive.
- Add the current value as the last positive row, dated the day of the valuation.
- Rows can be in any order. For long statements, paste date and amount columns into the paste box; formats such as 2/15/2024 and ($2,500.00) work.
- Set a discount rate to see the XNPV. A positive XNPV means the cash flows beat that rate.
- On a phone, use the ± button to make an amount negative.
The comparison card puts the simple return, the CAGR on totals and the =IRR() result next to the XIRR, and the schedule lists every discount factor.
XIRR in Excel and Google Sheets
In Excel, put the amounts in one column and the dates in the next and enter =XIRR(values, dates). An optional third argument is the guess, 10% by default; Excel iterates until the result is accurate within 0.000001 percent and returns #NUM! if it finds no result after 100 tries. Google Sheets uses =XIRR(cashflow_amounts, cashflow_dates, [rate_guess]) and points to IRR for cash flows at regular intervals. =XNPV(rate, values, dates) uses the same convention.
To check this calculator, load the "Excel's help example" preset. Microsoft's documentation lists −$10,000 on January 1, 2008 followed by four receipts and reports an XIRR of 0.373362535; the calculator returns 37.34%, and at a 9% rate its XNPV of $2,086.65 matches the XNPV help page.
Who this calculator is for
401(k), IRA and brokerage account holders who want one number for what their money actually earned; real estate and private investors with irregular distributions; anyone checking a statement's personal rate of return against their own records; and finance students verifying spreadsheet work. To project future contributions instead, use the 401(k) Calculator or the Investment Calculator.
Key terms
- Cash flow: money moving into the investment (negative) or out of it (positive).
- XNPV: the sum of all cash flows discounted to the first date at a chosen rate.
- XIRR: the rate at which the XNPV is zero.
- Money-weighted return: a return that depends on the size and timing of your own cash flows.
- Time-weighted return: a return that chains sub-period results and ignores cash-flow timing.
- Hurdle rate: the return you require; a positive XNPV at that rate means you beat it.
What changes your XIRR
- Timing of large deposits: money added before a strong stretch lifts the XIRR; money added before a drop lowers it.
- Front-loading: a worker who contributes the 2026 limit of $24,500 early in the year has more money exposed to the first months' returns than one who spreads it out. Their XIRRs differ whenever returns are uneven through the year, although the fund's return is the same for both. The 2026 catch-up for ages 50 and over is $8,000, or $11,250 at ages 60 to 63.
- Employer match: including it measures the account; leaving it out measures your own money and raises the XIRR.
- Fees: they are already inside the balance, so XIRR is net of them. In the Department of Labor's example, $25,000 growing for 35 years at a 7% average return reaches $227,000 with 0.5% in fees but only $163,000 with 1.5%, a 28% smaller balance.
- The valuation date: the same final value dated a month later spreads the gain over one more month.
Limitations
Cash flows that change direction more than once can have several valid rates. A project that costs $1,000, pays $3,600 a year later and needs $3,150 of cleanup a year after that has two, 50% and 110%, and some patterns have none at all. The calculator flags both cases; judge such investments by their XNPV at your hurdle rate. XIRR also annualizes short periods aggressively, ignores taxes unless you enter after-tax amounts, and says nothing about risk: two accounts with the same XIRR can have had very different rides.
Related calculators
- For evenly spaced yearly cash flows, use the IRR Calculator; for the present value of a periodic series, the NPV Calculator.
- For one starting value and one ending value, use the CAGR Calculator or the Rate of Return Calculator.
- For support and resistance levels on a chart, use the Pivot Point Calculator.
Sources
- Microsoft Support, XIRR function: 365-day year, 10% default guess, 100 tries, #NUM! and #VALUE! conditions, example result 0.373362535.
- Microsoft Support, XNPV function: example result $2,086.65 at 9%.
- Google Docs Editors Help, XIRR.
- Internal Revenue Service, IR-2025-111 (November 13, 2025): 2026 401(k) limit $24,500, catch-up $8,000, $11,250 at ages 60 to 63.
- U.S. Department of Labor, EBSA, A Look at 401(k) Plan Fees.
- Electronic Code of Federal Regulations, 29 CFR 2550.404a-5: average annual total return for 1-, 5- and 10-year periods.
⚠️ Common mistakes & edge cases
Mixing sign conventions
Every flow from you into the investment needs one sign and every flow back to you the other. Flipping all signs at once gives the same XIRR, but flipping only some produces a meaningless rate or no rate at all.
Forgetting the ending value
Without the current balance as a final positive amount, an account with only contributions has no XIRR, and one with withdrawals is treated as if the remaining money were lost. Add today's value on today's date.
Counting reinvested dividends
Dividends reinvested inside the account are growth, not new money. Entering them as deposits double-counts them and lowers the XIRR. Only dividends paid out to you in cash belong in the list, as positive amounts.
Using =IRR() on irregular dates
IRR treats the rows as one period apart. On the 401(k) example it returns 3.15% per period, against an XIRR of 9.97% per year. Use XIRR whenever the dates are uneven.
Reading a short-period XIRR as a yearly result
A 1% gain in a single day annualizes to 3,678.34%. For holding periods of a few weeks or months, report the simple return and the number of days instead.
Comparing your XIRR with a fund's published return
Funds publish time-weighted returns. In the deposit example the account's time-weighted return was 8.00% while the investor's XIRR was −5.93%. Neither number is wrong; they answer different questions.
❓ Frequently asked questions
What is XIRR?
XIRR is the annual rate of return that makes the present value of a set of dated cash flows equal zero. It is the internal rate of return for cash flows on irregular dates, and the standard way to measure the money-weighted return of an account with deposits and withdrawals. This calculator follows the convention of Excel's XIRR function, and Google Sheets offers an XIRR function with the same arguments.
What is the XIRR formula?
XIRR is the rate r that solves 0 = Σ P / (1 + r)^(days / 365), where P is each cash flow and days is the number of days between its date and the first date. A cash flow 730 days after the first is discounted for exactly two years. There is no closed-form solution, so the rate is found by iteration.
What is the difference between XIRR and IRR?
IRR assumes every cash flow is exactly one period apart, so it ignores the calendar; XIRR uses the actual date of each flow. For the 401(k) example on this page, Excel's IRR function on the same ten amounts returns 3.15% per period, a number with no useful meaning because the deposits are months apart, while XIRR returns 9.97% per year.
How is XIRR different from CAGR?
CAGR compares one starting value with one ending value and assumes nothing was added or withdrawn in between; XIRR handles any number of deposits and withdrawals. With one deposit and one final value, XIRR equals a CAGR measured in 365-day years: $10,000 growing to $13,000 over 1,096 days is 9.13% both ways. A CAGR over exactly three years gives 9.14%.
Is XIRR the same as the money-weighted return?
Yes. The money-weighted, or dollar-weighted, return is the internal rate of return of your own cash flows, and XIRR is how that rate is computed when the flows fall on irregular dates. It differs from the time-weighted return that funds report, which removes the effect of when money was added or withdrawn.
How do I calculate the rate of return on my 401(k) with XIRR?
List each contribution as a negative amount on the date it was deposited, add any withdrawals as positive amounts, and add the current balance as a final positive amount on the statement date. Include the employer match for the return on the whole account, or leave it out for the return on your own money, which will be higher. Reinvested dividends stay inside the account and are not cash flows.
Why does Excel's XIRR return #NUM!?
Microsoft documents four causes: the values lack at least one positive and one negative cash flow, a date falls before the first date in the list, the values and dates have different lengths, or no result was found within 100 tries. A guess closer to the answer can fix the last case. A #VALUE! error means a cell in the dates range is not a valid date.
Can XIRR be negative?
Yes. A negative XIRR means you got back less than you put in, after accounting for timing. In the deposit example on this page, an investor added $20,000 just before a 10% decline and ended the year with $28,800 on $30,000 of deposits: the XIRR is −5.93% even though the account's time-weighted return was +8.00%.
Why is my XIRR so high for a short holding period?
XIRR always reports an annual rate, so a short gain is compounded as if it repeated all year. A 1% gain in one day annualizes to 3,678.34%, and a 3% gain over 30 days to 43.28%. The math is correct but rarely useful; for holding periods of a few weeks, look at the simple return instead.
Does XIRR use 365 or 366 days in a leap year?
Excel's XIRR divides the actual number of days by 365 in every year, including leap years, and this calculator does the same. Three years that include February 29 count as 1,096 / 365 = 3.0027 years, which is why a lump-sum XIRR can differ from a three-year CAGR in the second decimal: 9.13% versus 9.14% in the example on this page.
💡 Good to know
Flipping every sign gives the same XIRR
Multiplying all cash flows by −1 does not move the rate at which the XNPV is zero, so the convention only has to be consistent. The XNPV itself flips sign, so keep money in as negative when you read it.
The first date is only a reference point
The XNPV is a value as of the first cash flow's date. Moving that reference scales the XNPV but never changes the XIRR, which depends only on the gaps between the dates.
Fees are already in your balance
Because the final value is after all account fees, the XIRR on your deposits is a net-of-fee return. The Department of Labor's example shows why that matters: one percentage point of extra fees leaves a 35-year balance 28% smaller.
Related Calculators
IRR Calculator
Calculate the internal rate of return of cash flows
NPV Calculator
Calculate the net present value of cash flows
CAGR Calculator
Calculate compound annual growth rate
Rate of Return Calculator
Calculate the annualized rate of return on an investment
401(k) Calculator
Project your 401(k) balance at retirement with employer match
Investment Calculator
Calculate investment growth with contributions and returns