Skip to content
ToolMug

XIRR Calculator

When money goes in and comes out at different times, "total profit ÷ total invested" is misleading. XIRR weights each amount by how long it was invested and gives the annualized return — the same result as the XIRR function in Excel or Google Sheets.

Runs in your browser — nothing you enter is uploaded

Enter every deposit as a negative amount and every withdrawal as a positive amount. For an investment you still hold, add today’s value as a positive amount on today’s date.

Paste from a spreadsheet

Annualized return (XIRR)

19.27%

Total invested

25,000.00

Profit

6,500.00

Same method as Excel’s XIRR: days between dates are counted and a year is 365 days.

How to use

  1. Enter each purchase or deposit as a negative amount and each sale, withdrawal or dividend as positive. For holdings you still own, add today's value as a positive amount on today's date.
  2. Or paste two columns (date, amount) from a spreadsheet and click Import.
  3. Read the annualized return, total invested and profit.

Options explained

XIRR
The rate r for which Σ amount ÷ (1 + r)^(days since the first flow ÷ 365) = 0, solved with Newton's method and a bisection fallback.
Signs
From the investor's side, money leaving your pocket is negative and money coming back is positive.

Two examples, with a leap-year effect

XIRR divides the days between each cash flow and the first one by 365. A leap year therefore counts as 366/365 years.

Cash flows XIRR
−1,000 on 1 Jan 2024; +1,100 on 1 Jan 2025 9.97%
−1,000 on 1 Jan 2024; +50 on 1 Jul 2024; +1,050 on 1 Jan 2025 10.22%

In the first case 1,000 grows to 1,100 over 366 days, so the annualized rate is a little under 10%, not exactly 10%. In the second, the 50 received after six months counts as money you could have reinvested, so the rate is a little above 10%.

The calculator needs at least two cash flows, with at least one negative and one positive amount. Zero amounts and rows with an invalid date are ignored.

Frequently asked questions

I invested 10,000 on 1 Jan 2024 and 10,000 on 1 Jul 2024; on 1 Jul 2025 it is worth 23,000. What is my return?

The 3,000 profit looks like 15%, but the second 10,000 was invested for only a year. XIRR gives about 11.80% a year.

How is this different from an investment calculator?

An investment calculator projects the future from a fixed contribution and rate. XIRR works backwards from cash flows that already happened to find the rate you actually earned.

What does a negative result mean?

The investment lost money; the figure is the loss expressed as an annual rate.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools