XIRR Calculator
Calculate the annualized internal rate of return for irregular cash flow schedules, periodic deposits, and withdrawals.
Cash Flow Schedule (3 Entries)
Format: YYYY-MM-DD. Negative = deposit; Positive = withdrawal or terminal valuation.
| Date (YYYY-MM-DD) | Amount | Description (Optional) | |
|---|---|---|---|
sum( C_i / (1 + +0.1950)^(days_i / 365) ) = 0How It Works
sum( C_i / (1 + r)^((d_i - d_0) / 365) ) = 0XIRR solves for the constant geometric annualized discount rate r that equates the net present value of all irregular cash flows to exactly zero, using the standard Excel 365-day convention.
- C_i
- Cash flow amount at step i. Outflows (deposits/investments) are NEGATIVE; inflows (withdrawals, dividends, final valuation) are POSITIVE.
- d_i
- Calendar date of cash flow i (evaluated in UTC calendar days).
- d_0
- Earliest calendar date in the schedule (baseline start date).
- r
- Annualized internal rate of return (XIRR).
- 365
- Standard annual day-count divisor under Excel / Google Sheets XIRR conventions.
- Assumes cash flows occur at exact calendar dates (using 365-day annualization).
- Assumes interim positive cash distributions can be reinvested at the computed internal rate r (standard IRR assumption).
- Excludes brokerage commissions, management expense ratios, and execution slippage.
- Excludes capital gains tax liabilities and dividend withholding drag.
- Excludes purchasing power inflation drag (models nominal annualized returns).
Worked Example
Multi-Deposit Schedule with Dividend and Current Valuation
An investor invests $10,000 on 2023-01-15, adds $5,000 on 2023-06-15, receives a $1,200 dividend distribution on 2023-09-01, and marks the current portfolio value at $16,500 on 2024-01-15.
- 1. Sign convention setup: Outflows (investments) are negative: -$10,000 and -$5,000. Inflows (dividend and terminal valuation) are positive: +$1,200 and +$16,500.
- 2. Total capital accounting: Total invested = $15,000. Total proceeds/valuation = $17,700. Absolute gain = +$2,700 (+18.00% total return).
- 3. Day count intervals: Day 0 (2023-01-15), Day 151 (2023-06-15), Day 229 (2023-09-01), Day 365 (2024-01-15, exactly 1.00 year).
- 4. Net present value polynomial: -10,000 - 5,000/(1+r)^(151/365) + 1,200/(1+r)^(229/365) + 16,500/(1+r)^(365/365) = 0.
- 5. Solution: Solved via Newton-Raphson, yielding an annualized XIRR of approximately +21.43%.
Common Mistakes
Inverting the sign convention: Entering investments as positive and withdrawals/current value as negative produces invalid rates or breaks mathematical convergence.
Using CAGR for multi-cash-flow schedules: CAGR only compares starting and ending values, completely ignoring the timing of interim deposits and withdrawals.
Omitting the current portfolio valuation: The final row must be the current total portfolio value as a positive number; omitting it treats your capital as a 100% loss.
Comparing annualized XIRR across short timeframes: A 2-week swing annualized into XIRR can produce extreme percentages (+500% or -80%) that do not reflect sustainable multi-year yields.
Frequently Asked Questions
What is the difference between CAGR, IRR, and XIRR?+
CAGR calculates geometric growth between two points assuming zero interim additions or withdrawals. Standard IRR assumes cash flows occur at strictly equal time intervals (e.g., exactly once a year). XIRR handles irregular, real-world calendar dates using exact day counts.
Why must money put in be negative and money taken out be positive?+
XIRR solves for the rate that balances net cash outlays with net cash recoveries. If all numbers have the same sign, the present value can never equal zero, and the mathematical formula has no solution.
Why must the current portfolio value be entered as a positive cash flow?+
From the perspective of cash flow accounting, your current portfolio value is what you would receive if you liquidated today. Without it, the calculation only sees capital leaving your bank account.
Can XIRR be negative?+
Yes. If the total proceeds and terminal valuation are less than the total invested capital, the annualized return rate will be negative, reflecting a net capital loss.
What does it mean if XIRR cannot find a solution?+
This typically occurs if all cash flows share the same sign (all positive or all negative), if dates are out of order with invalid intervals, or if extreme alternating cash flows create multiple theoretical mathematical roots without a unique financial rate.
Methodology & Tool Scope
What This Tool Does NOT Cover
To maintain mathematical rigor, this tool isolates capital recovery mechanics and deliberately excludes:
- •Interim portfolio price volatility occurring between cash flow transaction dates.
- •Personal income and capital gains tax liabilities on realized transactions.
- •Brokerage transaction fees, margin interest, and bid-ask execution spreads.
- •Reinvestment rate guarantee: assuming distributed cash earns the exact same return.
WealthSyntax provides educational calculators and general information. Results are estimates based on user-entered assumptions and are not financial, investment, tax, legal, or regulatory advice. WealthSyntax does not recommend securities, funds, brokers, or trading strategies.
What is the difference between XIRR and simple return
Simple return measures absolute percentage gain on capital regardless of duration or timing. XIRR calculates the exact annualized internal rate of return for irregular cash flows by solving the daily discounted equation where net present value equals zero. Use XIRR whenever periodic contributions, distributions, or withdrawals occur across calendar dates.
Related Resources
CAGR Calculator
Calculate compound annual growth rate, total percentage return, and annual progression for single lump-sum investments.
Loss Recovery Calculator
Calculate the asymmetric percentage return required to recover from portfolio drawdowns using L / (1 - L).
Compound Interest Guide
First-principles breakdown of exponential growth mechanics, logarithmic math, and recurrence relations.