What XIRR solves
XIRR is the rate r that makes the net present value of all your cash flows zero, discounting each one by the actual days since the first date over a 365-day year. That's how Microsoft Excel's XIRR and XNPV functions work. Unlike the plain IRR, the cash flows don't need to be evenly spaced.
Calcist starts at 10% (Excel's default guess) and uses Newton's method, which follows the slope of the NPV curve to the answer. If Newton's method doesn't settle, it switches to bisection: it finds two rates where the NPV has opposite signs and halves the gap until they agree. You need at least one negative and one positive amount.
Worked example
This is Microsoft's own example: −$10,000 on Jan 1, 2008, then $2,750 on Mar 1, 2008, $4,250 on Oct 30, 2008, $3,250 on Feb 15, 2009 and $2,750 on Apr 1, 2009. Excel's XIRR gives 0.373362535, and Calcist gives 37.34%. A simpler check: −$1,000 on Jan 1, 2024 and +$1,100 on Jan 1, 2025. That's 366 days (2024 is a leap year), so XIRR = 1.1365/366 − 1 = 9.97%, a touch under 10%.
Getting a realistic number
- Include today's value. For an investment you still hold, enter its current value as a positive amount dated today.
- Signs matter. Use negative for money you put in and positive for money you took out. Getting one wrong changes the answer completely.
- Short periods exaggerate. A 2% gain over two weeks annualizes to about 68%.
- Several sign changes (in, out, in again) can have more than one valid rate. Calcist, like Excel, reports the one it reaches from 10%.
This is an educational estimate, not financial, tax, legal or investment advice. Check the numbers with your own documents, lender or tax professional before you act.