Last updated:
The "what did I actually earn" rate of return — for portfolios with real cash flows on real dates.
XIRR (Extended Internal Rate of Return) is the discount rate that makes the present value of all dated cash flows equal zero. It is the money-weighted return on a portfolio with irregular contributions and withdrawals — the most honest measure of what an investor actually earned per dollar, per day invested.
0 = Σ CFᵢ / (1 + XIRR)^((dᵢ − d₀)/365)0 = Σ CFi / (1 + XIRR)(di − d0)/365There is no closed-form solution — XIRR is solved iteratively. Foliolytic uses Newton-Raphson with a robust bisection fallback when Newton fails to converge.
XIRR answers the question CAGR cannot: "If I keep adding and withdrawing money on weird dates, what is the true compound rate I earned, dollar-weighted?"
If you buy a stock at $100, it doubles to $200 in 5 years, you have a tidy CAGR of 14.9%. But if you instead bought $1,000 of it in year 1, another $9,000 in year 4 right before the gain, your XIRR is dramatically higher than the asset's CAGR — your dollars were only exposed for a year. The opposite is also true: poorly-timed buys (DCA-into-a-top) crater your XIRR even when the asset's TWR is fine.
On 2023-01-01 you deposited −$10,000 into a brokerage account. On 2024-06-01 you deposited another −$5,000. On 2026-01-01 the account is worth $18,500.
Solve: 0 = −10,000/(1+r)^0 + −5,000/(1+r)^1.41 + 18,500/(1+r)^3.0
XIRR = 11.4% — your actual money-weighted annual return.
Note the second deposit was only invested for 1.6 years, so XIRR weights it less than the first. That is the whole point.
There is no "good XIRR" in the abstract — it depends entirely on your investments. The right comparison is your XIRR vs. the XIRR you would have earned if you had put each contribution into the S&P 500 on the same day. That difference (sometimes called your "behavior gap") is the cleanest single measure of timing skill.
For broad equity portfolios over a multi-year horizon, XIRR usually lands within 1–4% of TWR. A gap larger than 4% is significant and almost always traces to bad timing of contributions.
Upload a brokerage CSV (IBKR, Schwab, Fidelity, Robinhood, Coinbase, Kraken, Binance…) and get your XIRR computed on your real holdings — alongside 70+ other portfolio metrics. No signup, runs in your browser.
Open the XIRR Calculator →Money-Weighted Return · Dollar-Weighted Return · TWR (Time-Weighted Return) · CAGR · Annualized Return
CAGR assumes one buy at the start and one sell at the end. XIRR handles any number of contributions and withdrawals on any dates, weighting each by how long the money was invested.
When you put in more money than the portfolio is now worth, after accounting for the time each dollar was invested. The function can also fail to converge if cash flows oscillate wildly — Foliolytic falls back to bisection in that case.
Most brokerages report time-weighted return (TWR), which measures the asset's performance, not your dollar experience. XIRR is money-weighted — if you bought heavily at the top, XIRR is lower; if you bought at the bottom, XIRR is higher than the broker's TWR.
Newton-Raphson with a robust bisection fallback. We use the actual date of every transaction in your upload (down to the day) and treat the current portfolio value as a final positive cash flow.
Upload your brokerage CSV — Foliolytic computes XIRR plus 70+ other metrics using real historical prices, real Treasury yields, and real CPI data. Free, no signup, your data stays in your browser.
Analyze your portfolio free →