Free calculator · Synthetic example
XIRR calculator for dated purchases and sales
XIRR turns dated purchases, sales and a current value into one annualized return. Start from the worked synthetic example below, or enter your own cash flows.
Calculator · Synthetic example to start
Enter your dated cash flows.
The rows start with a synthetic example: three purchases, a partial sale and a current value. Change any row, add rows or remove them. The result below updates as you type.
Money paid in is negative. Money received, and the value of the shares still held, is positive. Amounts on the same date are added together, and the rows can be in any order.
The dates and amounts you enter stay in this browser tab. They are never sent or saved.
Annualized return (XIRR)
8.42%
Counting when each amount was paid in or received, the money grew at the equivalent of 8.42% a year.
The time between two dates is the actual number of days divided by 365, also in leap years. Excel’s XIRR counts time the same way.
How to read the result
What XIRR measures
- XIRR uses the date of every amount.
- It is an internal rate of return for cash flows on any dates. It finds the yearly rate at which the money you paid in balances the money you received and the value you still hold. A purchase made a month before the end counts as invested for one month.
- CAGR gives the same figure for one purchase held for whole years.
- With one purchase and one final value, XIRR equals the CAGR, (final value ÷ purchase)1/years − 1, when you count the years as the actual days divided by 365. Over whole years with no 29 February, that is just the number of years. Add a second purchase or a sale and the two figures split, because CAGR only sees a start value and an end value.
- Excel’s XIRR counts days the same way.
- Excel discounts each amount by the days since the first date, on a 365-day year. Enter the same dated flows, with the earliest date first, and it should return the same rate, up to rounding. Excel searches from a guess, 10% unless you give one, and returns a #NUM! error if it finds no rate after 100 tries. This calculator shows a rate only when exactly one rate fits, and otherwise says why. Google Sheets also has an XIRR function, but its help page does not say how it counts days. To check, enter this page’s example there and compare with 8.42%.
For a worked example with XIRR, IRR and CAGR side by side, read XIRR vs IRR vs CAGR for a stock portfolio.
What this calculator is not
It is not the PerfectPerf audit. It uses the same IRR calculation, but only on the cash flows shown on this page. It reads no broker data and makes no ETF comparison.
Sources
- Microsoft — XIRR function: discounts each payment over a 365-day year, using the days between its date and the first payment date. Excel starts from a guess of 10% unless one is given. It returns the #NUM! error if a date comes before the first one, or if it finds no result after 100 tries.
- Google — XIRR in Google Sheets: the internal rate of return for cash flows that can be irregularly spaced, with an optional rate guess. The page does not state how days are counted.
Sources checked 20 November 2026. The example is synthetic. Its dates and amounts are invented and describe no real security or market history.