Skip to content

XIRR Calculator

Your yearly return when money went in and out on different dates…

Your yearly return when money went in and out on different dates: the XIRR of every deposit, withdrawal and today’s value, solved the way Excel and Google Sheets do it.

ExampleMoney-weighted return a year

7.58%a year

$17,000 put in and $22,300 back by Nov 1, 2026: a 31.18% total return, earned at 7.58% a year on the money while it was invested.

Enter your own dates and amounts to see your return.

Jan 2022Nov 2026
  • Balance at the XIRR$20k now
  • Money in, less money out
  • Put in
  • Took out
Money in
$17,000
Out, with the value now
$22,300
Total return (ROI)
31.18%

An estimate from the numbers you enter, before fees and taxes. Not financial advice. Past returns say nothing certain about future ones. Fees and taxes are not included unless they are in your amounts. SourcesTerms

Value now, or what you sold for

How this works: 8 sources,

How this works

Method

XIRR is the internal rate of return of cash flows on irregular dates. Each flow is discounted by (1 + r) raised to its time from the first flow, in years of 365 days, and r is the rate that makes the discounted flows sum to zero. Money you put in is negative and money you get back, including today’s value as if you sold, is positive. That is Microsoft Excel’s definition, which Google Sheets and LibreOffice follow. Full method

How it’s tested

5 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.

Limits

An estimate from the numbers you enter, before fees and taxes. Not financial advice. Past returns say nothing certain about future ones. Fees and taxes are not included unless they are in your amounts.

Privacy

On your device. Nothing you enter or open leaves this browser. About privacy labels

Changes

  • First published: ROI as a total and a yearly rate, dated cash flows with XIRR on a timeline, and CAGR, annualized return, XIRR, dividend and real return pages.

Every change on What’s new

How we make toolsReport a mistake

Worked example: two deposits and a sale

You invested $12,000 on March 1, 2021, added $6,000 a year later and sold everything for $26,500 on September 1, 2025. In total $18,000 became $26,500, a 47.22% gain. But the second $6,000 was invested for only three and a half years, so a yearly rate has to weight each deposit by its time in the market.

XIRR finds the rate r at which −12,000 + −6,000 ÷ (1 + r)^(365/365) + 26,500 ÷ (1 + r)^(1,645/365) = 0, counting years as days ÷ 365 from the first date. Here that is r = 9.69% a year. The same $2,000 put in early rather than late changes the answer too: in the table, identical amounts give 7.24% or 10.56% depending on when the second deposit went in.

How XIRR is solved

XIRR is the internal rate of return of cash flows on irregular dates. Each flow is discounted by (1 + r) raised to its time from the first flow, in years of 365 days, and r is the rate that makes the discounted flows sum to zero. Money you put in is negative and money you get back, including today’s value as if you sold, is positive. That is Microsoft Excel’s definition, which Google Sheets and LibreOffice follow.

There is no formula for r, so it is found numerically. This calculator starts Newton’s method from 10%, as Excel does, and stops when the rate moves by less than a millionth of a percentage point. If Newton’s method wanders off, for example after a near-total loss, it falls back to bisection: it brackets the answer between two rates where the sum changes sign and halves the gap until it is found, which cannot fail once a bracket exists. It is tested against Microsoft’s and LibreOffice’s published examples.

XIRR is a money-weighted return: your timing counts. Adding money just before a rise lifts it; adding before a fall lowers it. A fund’s published returns are time-weighted, which strips out the timing of deposits, so your XIRR can differ from the fund’s return while both are right. When cash flows change sign more than once, more than one rate can balance them; the calculator reports the one nearest 10%.

Σ amountᵢ ÷ (1 + r)^((dateᵢ − date₁) ÷ 365) = 0

  • Excel’s XIRR counts time as days ÷ 365 from the first payment, starts from a 10% guess and iterates until the result is accurate to within 0.000001 percent; its documented example returns 0.373362535, or 37.34%. Source: Microsoft Support, XIRR function.
  • LibreOffice Calc documents the XIRR of −10,000 on 2001-01-01 followed by 2,000, 2,500, 5,000 and 1,000 later that year as 0.1828, or 18.28%. Source: LibreOffice Help, Financial functions part three: XIRR.
  • An internal rate of return is the discount rate that makes the net present value of all cash flows zero. Source: Wikipedia, Internal rate of return.

XIRR on known examples

Published spreadsheet examples and hand-checkable cases, as this calculator solves them.

XIRR on known examples
Cash flowsInBackXIRR
Microsoft’s XIRR example (5 flows, 2008–2009)$10,000$13,00037.3363%
LibreOffice’s XIRR example (5 flows, 2001)$10,000$10,50018.2843%
Two $1,000 deposits a year apart, $2,310 after two years$2,000$2,3109.9901%
$1,000 in 2020 and in mid-2020, $2,600 in 2024$2,000$2,6007.2358%
$1,000 in 2020 and in 2023, $2,600 in 2024$2,000$2,60010.5576%
This page’s example: six deposits, a withdrawal, the value now$17,000$22,3007.5805%

Sources

Common questions

What is XIRR?

The yearly return on a set of cash flows that happen on different dates: deposits, withdrawals and the value at the end. It is the rate at which all of them, each discounted from its own date, add up to zero.

How do I use XIRR for a monthly investment plan (SIP)?

Enter each monthly amount as “Put in” on its date, and today’s value as the last row. The XIRR is your yearly return on the plan, counting that later installments were invested for less time.

Why is my XIRR different from the fund’s return?

The fund reports a time-weighted return, which ignores when investors added money. XIRR is money-weighted: if you put more in before a good stretch, your XIRR is higher than the fund’s, and lower if before a bad one.

What is the difference between IRR and XIRR?

IRR assumes the cash flows are evenly spaced, one per period. XIRR takes each flow’s actual date, so it handles irregular investing.