Best Deal Financial Planning PRO Bundle
✓ Financial Planning✓ Net Worth Tracker✓ Monthly Budgeting✓ Travel Budget Planner✓ Annual Budgeting Planner
View Details →
advanced Investment

XIRR (Irregular Cash Flows)

Calculate investment returns when cash flows occur at irregular intervals, not fixed periods.

Formula
=XIRR(cash_flows, dates)

How It Works

XIRR calculates the internal rate of return for cash flows that don’t occur at regular intervals. Unlike IRR (which assumes equal periods), XIRR uses actual dates - making it the gold standard for tracking real portfolio performance.

Syntax

=XIRR(values, dates, [guess])
  • values: Cash flow amounts (negative for outflows, positive for inflows)
  • dates: Corresponding dates for each cash flow
  • guess: Optional starting estimate

Example

Investment Account Activity:

DateCash FlowDescription
1/15/2023-$10,000Initial investment
4/3/2023-$5,000Additional deposit
7/22/2023$500Dividend
11/8/2023-$3,000Another deposit
1/15/2024$20,500Current value

Formula: =XIRR(B2:B6, A2:A6)

Result: 11.8% annualized return

Why XIRR Matters

Regular IRR would wrongly assume equal spacing between these transactions. XIRR uses actual dates, giving you the true annualized return on your specific timing of deposits and withdrawals.

Portfolio Performance Tracker

Track your actual investment returns:

DateTransactionAmount
1/1/2023Initial-25000
2/15/2023Deposit-2000
3/1/2023Deposit-2000
5/10/2023Withdrawal5000
8/20/2023Deposit-3000
12/31/2023Value30500

Your Return: =XIRR(C2:C7, A2:A7) = 12.3%

This tells you exactly how well your money performed given YOUR timing of contributions and withdrawals.

401(k) True Return

Calculate your actual 401(k) return including all contributions:

DateFlowType
1/15/2023-500Contribution
1/31/2023-500Contribution
2/15/2023-500Contribution
12/15/2023-500Contribution
12/31/202345000Year-end value

Formula: =XIRR(cash_flows, dates)

This accounts for the fact that early contributions had more time to grow than later ones.

Real Estate with Irregular Cash Flows

DateAmountDescription
3/15/2020-60000Purchase
4/1/20201200Rent
5/1/20201200Rent
Monthly rent
9/15/2020-2500Repair
2/1/2023-4000Renovation
8/20/202495000Sale

XIRR handles the irregular repair costs and varying rent collection dates correctly.

Comparing Investment Options

Which investment actually performed better?

Investment A:

DateFlow
1/1/23-10000
12/31/2311500
XIRR: 15.0%

Investment B:

DateFlow
1/1/23-10000
3/15/23-5000
12/31/2317000
XIRR: 13.2%

Investment A had better return despite B having higher total gain, because A’s money was working longer.

Adding Current Value

To calculate return-to-date, include current portfolio value as a positive cash flow:

=XIRR(VSTACK(contributions, current_value), VSTACK(contribution_dates, TODAY()))

Or manually add today’s date and positive value as the last row.

Dollar-Weighted vs. Time-Weighted Returns

XIRR (Dollar-Weighted):

  • Accounts for timing and size of your deposits
  • Reflects YOUR actual experience
  • Affected by when you added/removed money

Time-Weighted Return:

  • Measures pure investment performance
  • Ignores cash flow timing
  • Used by fund managers

For personal tracking, XIRR is usually more relevant.

Building an Investment Tracker

A (Date)B (Description)C (Flow)
1/15/23Initial deposit-10000
2/1/23Monthly contribution-500
3/1/23Monthly contribution-500
4/1/23Monthly contribution-500
=TODAY()Current value=portfolio_value
XIRR=XIRR(C:C, A:A)

Update the current value cell regularly to track performance.

XIRR vs. Simple Return

MetricFormulaResult
Simple Return=(End-Start)/Start15%
XIRR=XIRR(…)11.8%

Simple return ignores that you added money during the year. XIRR shows the true rate your money earned.

Handling Edge Cases

Short Holding Periods

XIRR annualizes returns. A 5% gain over 1 month becomes ~80% annualized. This is mathematically correct but can be misleading.

Context formula:

=IF(DAYS(MAX(dates), MIN(dates)) < 365,
    "Annualized: " & TEXT(XIRR(...), "0%") & " (Short period)",
    XIRR(...))

All Positive or Negative Flows

XIRR needs at least one positive and one negative cash flow. If tracking only contributions, add current value as positive final flow.

Pro Tips

  1. Always include current value - treat it as a positive “outflow” (money you could withdraw)

  2. Track every transaction - missing flows skew the result

  3. Be consistent with timing - use transaction dates, not statement dates

  4. Compare to benchmarks - your XIRR vs. S&P 500 over same period shows if you’re beating the market

  5. Reinvested dividends - include as separate positive then negative flows on the same date

Common Errors

  • #NUM! error: No solution found - check that you have both positive and negative flows
  • #VALUE! error: Dates and values arrays are different sizes
  • Extremely high/low result: Short time period amplifies annualized rate
  • Dates as text: Ensure dates are actual date values, not text strings

Want More Than a Formula?

Our premium spreadsheet templates do the heavy lifting for you - with automatic calculations, visual charts, and everything pre-built. One-time purchase, no subscriptions.

Private & secure

Your financial data stays on your device. We never see it.

Learn more →

Need help?

Check our guides or reach out with questions.

View FAQ →