Finance and accounting
XIRR and XNPV calculator for dated cash flows
Annualized internal rate of return and net present value for cash flows on irregular dates, matching spreadsheet XIRR and XNPV.
Runs in your browser. What you enter stays on this page and is not uploaded.
One per line: a date as YYYY-MM-DD, then the amount. Outflows are negative. You can paste two columns from a spreadsheet.
Result
Method and limits
Each cash flow is discounted by the actual number of days since the first date, divided by 365. XIRR is the annual rate that makes XNPV zero.
XNPV = Σ P_i / (1 + r)^((d_i − d_1) / 365)Assumptions and limits
- Dates are sorted first; the earliest date is the start.
- The 365-day year is the spreadsheet convention, also in leap years.
- When several rates give XNPV = 0, the one nearest 10% is shown and all are listed.
- An educational calculation, not financial, tax, legal or investment advice.
Worked example
Microsoft’s example: −10,000 on 2008-01-01, then 2,750, 4,250, 3,250 and 2,750 on 2008-03-01, 2008-10-30, 2009-02-15 and 2009-04-01 give XIRR = 37.34% and, at 9%, XNPV = 2,086.65.
References
Related tools
- IRR and MIRR calculatorInternal rate of return and modified internal rate of return of periodic cash flows, with a warning when the cash flows allow more than one IRR.
- Net present value (NPV) calculatorDiscount a series of cash flows to net present value, with the textbook period-0 or the spreadsheet NPV timing and a discounted cash flow table.
- CAGR calculator (compound annual growth rate)Compound annual growth rate between a starting and an ending value over any number of years, with total change and growth multiple.
- Return on investment (ROI) calculatorReturn on investment as a percentage, net gain and, with a holding period, the annualized (compound) return.