Investment Return Calculator
Calculate total gain, absolute return, and annualized XIRR from dated contributions and withdrawals — paste multiple rows at once. In your browser.
🔒 This tool runs entirely in your browser. Your files are never uploaded to a server.
—
Cash flows
Enter each contribution as a negative amount, and each withdrawal or your current value as a positive amount.
- Total invested
- —
- Net gain
- —
- Absolute return
- —
- Annualized return (XIRR)
- —
How it works
- Add a row for every contribution, withdrawal, and your current value, each with its own date — or click "Paste multiple" to add several at once as "YYYY-MM-DD, amount" lines.
- Contributions are negative, withdrawals and current value are positive.
- See total invested, net gain, absolute return, and the annualized XIRR return update instantly.
The formula
XIRR solves for the rate r where the present value of every cash flow, discounted by its actual number of days from the first flow, sums to zero:
Σ CFᵢ ÷ (1 + r)^(daysᵢ ÷ 365) = 0
There's no closed-form solution, so it's solved iteratively (Newton-Raphson), the same approach spreadsheet software uses.
FAQ
How is this different from a simple ROI calculator?
A basic ROI calculator only handles one investment and one final value. This tool accepts multiple cash flows on different dates — several contributions, withdrawals, and a current value — and calculates a single annualized return (XIRR) that correctly accounts for when each amount moved, not just how much.
What is XIRR?
The "Extended Internal Rate of Return" — the annualized return rate that would make the present value of every cash flow (each discounted by its actual date, not just counted equally) sum to zero. It's the same calculation spreadsheet software's XIRR function performs.
Why do I enter contributions as negative numbers?
Cash flow convention: money leaving your pocket (an investment) is negative, and money coming back to you (a withdrawal, or your portfolio's current value entered as if you cashed out today) is positive.
What if the calculator says the annualized return is "N/A"?
XIRR uses an iterative numerical method that can fail to converge for unusual cash flow patterns (e.g. all flows on the same side, or extreme values) — the net gain figure is still valid even when XIRR can't be computed.
What is "absolute return" and how is it different from XIRR?
Absolute return is simply net gain divided by total invested — it ignores time entirely. XIRR annualizes the return, accounting for exactly when each cash flow happened, so it is the more meaningful figure when contributions are spread over months or years; absolute return is a quick, undated sanity check alongside it.
Can I add several cash flows at once instead of one at a time?
Yes — click "Paste multiple" and paste one cash flow per line as "YYYY-MM-DD, amount". Only that exact date format is accepted, since guessing between day-first and month-first formats risks silently swapping a date.
How we compare
| Feature | Online Tool Store | Spreadsheet XIRR formula | Basic ROI calculators |
|---|---|---|---|
| Multiple dated cash flows | ✓ | ✓ | One initial, one final value only |
| Paste multiple cash flows at once | ✓ | ✓ | Not applicable |
| Absolute return shown alongside XIRR | ✓ | Manual formula | ✓ |
| No spreadsheet setup required | ✓ | Requires building a spreadsheet | ✓ |
| No ads | ✓ | ✓ | Often ad-supported |
Real portfolios rarely have just one contribution — this handles the irregular deposits and withdrawals a basic ROI calculator can't.