Free XIRR Calculator for Investment Portfolios
Upload your brokerage CSV and get your true money-weighted annualized return. XIRR accounts for every deposit, withdrawal, and dividend — no spreadsheet formulas required.
What Is XIRR?
XIRR (Extended Internal Rate of Return) is the single most accurate way to measure your investment performance when you've added or withdrawn money at different times. It calculates an annualized rate of return that accounts for the exact date and size of every cash flow in your portfolio — deposits, withdrawals, dividends, and your current value.
Standard return calculations assume you invested a lump sum on day one and never touched it. That works for textbooks, but not for real investors who dollar-cost average, rebalance, take profits, or add money when they get a bonus. XIRR solves this by finding the single discount rate that makes the net present value of all your cash flows equal to zero.
In mathematical terms, XIRR solves for the rate r in this equation:
Σ CFi / (1 + r)(di - d0) / 365 = 0
Where CFi is each cash flow, di is its date, and d0 is the first cash flow date
Because this equation has no closed-form solution, XIRR must be solved iteratively — which is why you need a calculator rather than a simple formula. The result is a single annualized percentage that tells you exactly how hard your money worked for you.
XIRR vs Other Return Metrics
Return metrics are not interchangeable. Each answers a different question about your portfolio. Here is when to use each one:
| Metric | What It Measures | Cash Flow Aware? | Best For |
|---|---|---|---|
| XIRR | Annualized money-weighted return using exact dates of all cash flows | Yes, with exact dates | Your true personal return with irregular deposits and withdrawals |
| Simple Return | Total percentage gain or loss: (End - Start) / Start | No | Quick snapshot of lump-sum performance over any period |
| CAGR | Compound annual growth rate assuming no intermediate cash flows | No | Comparing buy-and-hold returns across different time periods |
| TWR | Time-weighted return that neutralizes the effect of cash flows | Neutralizes them | Evaluating a fund manager's skill independent of investor deposits |
Key insight: TWR tells you how well the portfolio strategy performed. XIRR tells you how well you performed — because it penalizes you for adding money right before a crash and rewards you for adding money before a rally. For most retail investors tracking their own portfolio, XIRR is the metric that matters.
How Foliolytic Calculates XIRR
No manual data entry. No spreadsheet gymnastics. Upload your brokerage export and Foliolytic handles the rest:
Upload your brokerage CSV
Export your transaction history from any major brokerage — Fidelity, Schwab, IBKR, Robinhood, Coinbase, Kraken, and more. Foliolytic auto-detects the format.
Automatic cash flow extraction
The parser reads every buy, sell, and transfer, extracts the dollar amount and exact date, and builds a complete cash flow timeline. Dividends and stock splits are pulled from Foliolytic's own database — you don't need to track them.
Newton-Raphson iterative solver
Foliolytic uses the Newton-Raphson method — the same algorithm behind Excel's XIRR function — to iteratively solve for the discount rate. It converges to a tolerance of 1e-10, giving you a precise annualized result in milliseconds.
Annualized result with full context
Your XIRR is displayed alongside 70+ other metrics — Sharpe ratio, Sortino, max drawdown, beta, alpha, VaR — so you understand not just your return, but the risk you took to earn it.
Calculate Your XIRR Free
No signup, no email, no credit card. Upload a CSV and see your results in seconds.
Open the AnalyzerWhen XIRR Matters Most
XIRR is essential whenever the timing of your cash flows significantly affects your true return. These are the scenarios where simpler metrics break down:
Dollar-Cost Averaging
You invest a fixed amount every month. Simple return ignores that early contributions have compounded longer than recent ones. XIRR weights each contribution by its actual time in the market.
Regular Contributions
401(k), IRA, or brokerage auto-deposits. With money entering your portfolio on different dates, only XIRR gives you an honest annualized performance figure.
Partial Withdrawals
Taking profits, funding a purchase, or drawing retirement income. Each withdrawal changes your invested capital — XIRR tracks the real impact on your return.
Tax-Loss Harvesting
Selling losers and rebuying similar positions creates complex cash flow patterns. XIRR correctly handles the sequence of sells and buys to measure your after-trade performance.
Lump-Sum Additions
Investing a bonus, inheritance, or windfall mid-year. CAGR treats it as if it was there from the start. XIRR correctly accounts for the exact date the money entered the portfolio.
Multiple Account Consolidation
Transfers between brokerage accounts, rollovers, and account merges create cash flow events that only XIRR can properly reconcile into a single performance number.
Frequently Asked Questions
What is the difference between XIRR and IRR?
IRR (Internal Rate of Return) assumes that all cash flows occur at equal time intervals — typically monthly or annually. XIRR extends this by using the exact date of each cash flow, removing the equal-interval assumption entirely. For investment portfolios where you deposit $500 on January 3rd, $1,200 on March 17th, and withdraw $800 on September 9th, IRR would force these into regular periods and produce an inaccurate result. XIRR handles them at their actual dates. In practice, any real-world portfolio with irregular transactions should use XIRR rather than IRR.
Can XIRR be negative?
Yes, absolutely. A negative XIRR means your portfolio has lost value on an annualized basis after accounting for the timing of every cash flow. For example, if you invested $10,000 and your portfolio is worth $8,500 one year later, your XIRR would be approximately -15%. Negative XIRR is common during bear markets, and it can also occur when you add large amounts of money right before a downturn — precisely the kind of timing effect that XIRR captures and simpler metrics miss.
How do dividends affect XIRR?
Dividends are positive cash flows generated by your investments, so they increase your XIRR. Each dividend is treated as a cash inflow on the date it was paid. If dividends are reinvested, they appear as both an inflow (the dividend received) and an outflow (the reinvestment purchase), which nets out but correctly captures the compounding effect. Foliolytic automatically pulls every dividend payment from its historical database for each ticker in your portfolio, so you don't need to manually enter dividend data.
What is a good XIRR for a stock portfolio?
Context matters enormously, but here are rough benchmarks: the S&P 500 has historically delivered about 10% annualized (nominal) or roughly 7% after inflation. An XIRR above 10% over a multi-year period is generally strong. Sustaining 15-20% XIRR over 5+ years would place you among top-performing retail investors. However, XIRR varies significantly with market conditions — many portfolios showed 20%+ XIRR during 2020-2021 and negative XIRR in 2022. Always evaluate XIRR relative to the time period and the risk you took (which is why Foliolytic also calculates Sharpe ratio and max drawdown).
How accurate is Foliolytic's XIRR calculation?
Foliolytic uses the Newton-Raphson iterative method — the same numerical approach behind Excel's XIRR function and professional-grade financial software. The solver iterates until the net present value converges to within a tolerance of 1e-10, producing results accurate to many decimal places. Additionally, Foliolytic automatically incorporates stock splits and dividend data from its own historical database covering 1,400+ tickers with daily prices going back 20+ years for stocks and to inception for crypto. Your XIRR result reflects the full picture, including corporate actions that many manual spreadsheets miss.