XIRR Calculator

Type one cash flow per line, its date and then its amount. Money you put in is negative, money you get back is positive. The result is the yearly rate that Excel's XIRR function gives for the same dates.

Free Runs in your browser Checked Tuesday, November 10, 2026

Write each line as a date, a space and an amount, for example 2021-01-01 -10000. A date may also be written 01.01.2021. The first line is the earliest cash flow, and no later line may have an earlier date.

Result

XIRR, the yearly return — The yearly rate at which the dated cash flows add up to zero. Unlike the IRR, it uses the real days between the dates.
Total at this rate — The cash flows discounted to the first date at the XIRR. It is zero when the rate is found, so it shows the result is right.
Each cash flow and its days from the first date

How the figure is worked out

This tool runs in your browser. What you enter is not sent to us.

How to use it

  1. On each line of Cash flows: date and amount, one per line, type the date, a space, and the amount. Money you put in is negative.
  2. Put the earliest cash flow on the first line. Use one line for each payment, in any order after that.
  3. Read the XIRR, the yearly return at the top of the result.
  4. Check the Total at this rate, which is zero when the rate is right, and read the table of days and discounted amounts.

How the XIRR is calculated

An investment often gets money back on dates that are not a year apart: a dividend in March, another in October, a sale in February. The IRR assumes the same gap between every cash flow, so it cannot use the real dates. The XIRR can. It finds the one yearly rate at which the dated cash flows add up to zero.

Microsoft defines the XIRR function in Excel as the rate r that solves the equation below, where each date is counted from the first one and a year has 365 days.

sum over i of  Pᵢ ÷ (1 + r)^((dᵢ − d₁) ÷ 365) = 0

Pᵢ = the amount of cash flow i
dᵢ = its date, d₁ = the first date
r  = the yearly rate, found by a numerical method
  • The first cash flow is at the first date and is not discounted, since its days are 0.
  • A flow 365 days after the first date is discounted by one year at the rate.
  • The rate is solved by Newton's method from 10 %, the guess Excel starts from, and by a search for sign changes when Newton does not settle.

The 365-day year and the first date

Excel counts every year as 365 days, also a leap year. So 1 January 2020 to 1 January 2021 is 366 days, and 100 paid then and 110 back give a rate of 1.1 to the power of 365/366, minus 1, which is 9.97 %, not 10 %.

A date before the first one is refused, as Excel returns the #NUM! error for it. That is why the first line must be the earliest date.

What this calculator does not include

  • Fees, commissions, taxes on the gains and the effect of inflation. Enter the amounts after them, or read the result as before tax.
  • Cash flows that are not dated, or a rate that changes over time. Use one rate for the whole period.
  • Several investments at once. Each calculation covers one set of cash flows.

Worked example: the Microsoft Excel XIRR example

Invest 10,000 on 1 January 2008. Then receive 2,750 on 1 March 2008, 4,250 on 30 October 2008, 3,250 on 15 February 2009 and 2,750 on 1 April 2009. The days from the first date are 0, 60, 303, 411 and 456. The rate at which the total is zero is 37.34 % a year, the same figure as the Microsoft support page for XIRR.

Discounted to 1 January 2008 at 37.34 %, the flows are −10,000.00, 2,610.26, 3,265.94, 2,273.70 and 1,850.10, which add up to zero.

Date Cash flow Days Discounted
1 Jan 2008 −10,000.00 0 −10,000.00
1 Mar 2008 2,750.00 60 2,610.26
30 Oct 2008 4,250.00 303 3,265.94
15 Feb 2009 3,250.00 411 2,273.70
1 Apr 2009 2,750.00 456 1,850.10

Frequently asked questions

Why does the XIRR differ from the IRR?

The IRR treats every cash flow as one period apart, while the XIRR counts the real days between the dates and divides by 365. When the dates are a year apart, both give the same rate.

Why does the calculator refuse a date?

A date must be a real day, written as 2021-01-01 or 01.01.2021, and no date may come before the first line. Excel refuses an earlier date in the same way.

Why is there no XIRR for my cash flows?

The XIRR needs at least one amount paid in and one paid out, and some rate must make the total zero. When all the money comes back on one date, or the amounts never balance, no rate exists.

Can I enter the dates in Turkish or European style?

Yes. Write 01.01.2021 with dots between day, month and year, as Turkish and European dates are written, or use the ISO form 2021-01-01 that works everywhere.

Is my data sent to a server?

No. The calculation runs in your browser, and nothing you type is sent to us or stored.

Sources

Figures and text last checked on Tuesday, November 10, 2026.

We use necessary cookies to run the site. With your consent, Google also uses advertising cookies to show personalised ads. If you reject them, you still see ads, but they are not personalised.