Annualized return calculator
An annualized return calculator converts the total gain on an investment into a compound rate per year, so holdings bought at different times and held for different periods can be compared.
Enter what you paid, when, and what it is worth now. You get the total return, the annualized rate per year, and — if you bought more than once — how each purchase has done on its own. One purchase or several, still held or partly sold.
Your purchases and sales
One row per transaction, with the date. Add every purchase — the whole point is that you probably bought more than once.
What it is worth now
Today's share price, or the price you sold at if the position is closed. Leave the date as today unless you are measuring to a past date.
Each purchase on its own
Which lot is doing the work. Each one is measured from its own date and price to the value now, as if it were still held.
| Lot | Bought | Shares | Paid | Total return | Annualized |
|---|---|---|---|---|---|
| Lot 1 | 2023-01-17 · 3y | 10 | $150.00 | +73.33% | +20.10% |
| Lot 2 | 2024-06-03 · 1y 7mo | 5 | $210.00 | +23.81% | +14.05% |
Runs in your browser. Nothing is saved or sent anywhere.
How annualized return is calculated
Total return — the holding-period return — is the easy half: what it is worth now, plus anything you took out, minus what you put in, divided by what you put in. Annualizing asks a harder question — what steady rate per year, compounding, would have turned the start into the finish over exactly this many days. For a single purchase that is the compound annual growth rate:
annualized return = (value now ÷ amount invested)365 ÷ days held − 1
Worked example — one purchase
You bought 10 shares at $150 on 17 January 2023 — $1,500. On 17 January 2026 the shares are at $260, so the position is worth $2,600.
- Total return:
(2,600 − 1,500) ÷ 1,500 = +73.33% - Days held:
1,096(three years, one of them a leap year) - Annualized:
(2,600 ÷ 1,500)^(365 ÷ 1,096) − 1 = +20.10%per year
Dividing 73.33% by three would give 24.44%, and it would be wrong. Compounding means each year's gain was earned on a larger base than the last, so the steady rate that explains the result is lower than the simple average.
Why one formula is not enough when you bought more than once
Most annualized return calculators stop at the formula above, which quietly assumes you bought everything on one day. Almost nobody does. Add to a position eighteen months later and there is no single “start” any more: part of your money has been working for three years and part for eighteen months. Blending the purchases into one average cost and one start date produces a number that looks precise and is not.
The correct answer treats every purchase and sale as a dated cash flow and finds the one annual rate that, applied to each flow for exactly as long as it was invested, reproduces what you have today. That is the money-weighted return — the number a spreadsheet's XIRR function returns — and it is what the calculator switches to as soon as a second purchase or any sale is entered.
Worked example — two purchases
Same first purchase — 10 at $150 on 17 January 2023 — and then 5 more at $210 on 3 June 2024. Valued at $260 on 17 January 2026: 15 shares, $3,900, against $2,550 put in.
- Total return:
(3,900 − 2,550) ÷ 2,550 = +52.94% - First lot on its own:
+20.10%per year, as above - Second lot on its own:
(260 ÷ 210)^(365 ÷ 593) − 1 = +14.05%per year - Money-weighted, both together:
+18.74%per year
Run the blended $2,550 through the single-purchase formula from the first date instead and you get 15.20% — too low, because it pretends the second $1,050 was invested a year and a half before it actually was. The per-lot table in the calculator shows this split so you can see which purchase is doing the work.
Money-weighted vs. time-weighted return
These answer two different questions, and confusing them is the commonest way to misread a performance figure.
Money-weighted return (XIRR, or internal rate of return) answers “what did my money earn?” It is affected by when you added or withdrew: buy more just before a rise and your money-weighted return beats the stock's; buy more just before a fall and it trails. That is the right number for judging your own result.
Time-weighted return answers “what did the investment do?” It strips out the timing of your cash flows entirely, which is why fund managers report it — they do not control when investors deposit. For a single stock it reduces to something simple: the share price's own return from your first purchase to today, however many times you added along the way. In shares mode, the calculator shows it alongside the money-weighted figure whenever you have entered more than one purchase, so you can see how much of your result came from the stock and how much from your timing.
For a portfolio of several holdings, a true time-weighted return needs the portfolio's value on every date money moved in or out — the sub-periods between cash flows are chained together. That is a bookkeeping burden rather than a maths one, and it is the reason most people who ask “how is my portfolio doing?” are better served by the money-weighted figure, which needs only the cash flows and the value now.
Calculating the return on a whole portfolio
Switch the calculator to dollar amounts and the same method scales up. Every deposit into every account becomes a purchase on its date; every withdrawal becomes a sale; the ending value is everything added together today. It does not matter that the money went into different holdings at different brokerages — the money-weighted return only cares about when cash went in and out and what it is all worth now.
The difficulty is upstream of the arithmetic. A taxable account here, a Roth there, an old employer plan somewhere else, and each app reports a confident figure for its own slice only. Getting the dates and amounts from all of them into one list is the work, and no single broker app can do it for you, because none of them can see the others.
What to count in “value now”
Two things decide whether the figure you get is the one you think it is.
Dividends. Left out, you are measuring price return; included, total return. In dollar-amounts mode, add cash dividends as sales on the dates they were paid; in shares mode, add reinvested dividends as purchases at the reinvestment price. Over a long holding the gap is larger than most people expect — total return vs. price return shows how much.
Realized or not. An annualized figure on a position you still hold is a snapshot: the ending value is today's price, and tomorrow's price will move it. Nothing is locked in until you sell — unrealized vs. realized gains covers the distinction. And the whole calculation rests on knowing what you paid: if the records are gone, start with finding the cost basis of old stock, and if the shares have split since, run them through the stock split calculator first so the per-share prices line up.
That was one holding. The inputs are the hard part for all of them.
The calculation takes a second once you have the dates, the prices and today's value. What takes the time is having those to hand for every position, across every account, without a records hunt each time you want to know how something has done.
StoxDeck keeps exactly those inputs current. Enter each lot once — date, shares, cost, no brokerage login — and it prices the whole deck live on every load, across every account, with gain and loss measured from what you actually paid. It does not annualize the figure for you; it makes sure the numbers you would paste in here are always ready and always right.
Build your first deckOr try the demo deck first — it needs no signup. Bought at several prices and want the blended figure? The cost basis calculator works out your average cost per share.
More free tools
- Cost basis calculatorWeighted average cost per share across several purchases, plus unrealized gain.
- Stock profit calculatorProfit or loss, return on cost and break-even price on a sale, fees netted out.
- Portfolio rebalancing calculatorHow far each holding has drifted from its target weight, and what to buy or sell.
- Stock split calculatorNew share count and corrected cost basis per lot after a forward or reverse split.
- Portfolio tracker spreadsheetA free Google Sheets and Excel template with live price lookups wired in.
Common questions
What is the difference between total return and annualized return?
Total return is the whole gain or loss over the entire time you held, as a percentage of what you put in. Annualized return converts that into an equivalent rate per year, so a holding kept for three years and one kept for eight months can be compared on the same footing. A 52.9% total return over three years and a 52.9% total return over eight months are very different results; annualizing is what makes the difference visible.
Is annualized return the same as CAGR?
When there is one purchase and no sales, yes — the annualized return is the compound annual growth rate, (ending value ÷ starting value) ^ (1 ÷ years) − 1. The two names describe the same number. Once there are several purchases on different dates, a single start-and-end formula no longer fits, and the annualized figure has to be solved from the dated cash flows instead. That is the money-weighted return, which spreadsheets call XIRR. This calculator uses the plain CAGR formula when it applies and switches to the money-weighted method when it does not, and says which one it used.
What is the annualized return formula?
Annualized return = (ending value ÷ starting value) ^ (365 ÷ days held) − 1. Using days rather than whole years keeps a holding of two years and four months honest. For example, $1,500 that becomes $2,600 after 1,096 days is (2,600 ÷ 1,500) ^ (365 ÷ 1,096) − 1 = 20.10% per year. When there are several dated purchases or sales, the formula becomes an equation with no closed form — the rate that makes every cash flow, discounted back to the first purchase date, sum to zero — and the calculator solves it numerically.
Does it make sense to annualize a return on something held for less than a year?
It is calculated the standard way, but treat it with care. Annualizing a three-month gain assumes the next nine months look the same, which nothing guarantees. The calculator shows the figure and flags any holding period under a year, because the total return is usually the more meaningful number in that case.
How do you calculate the return on a whole portfolio across several accounts?
The same way as for one holding, with every purchase and sale from every account entered as a dated cash flow and the combined current value as the ending value. In dollar-amounts mode you can enter each deposit as a purchase and each withdrawal as a sale, regardless of how many holdings or brokerages they were spread across. The hard part is not the arithmetic — it is having every cost basis, date and current value in one place, because no single brokerage app shows you accounts held elsewhere.
Should I include dividends?
If you want total return, yes. In dollar-amounts mode, add cash dividends you received as sales (money that came back to you) on the dates they were paid. In shares mode, add reinvested dividends as purchases at the reinvestment price. If you leave them out you are measuring price return only, which understates the result for anything that pays a dividend. The post on total return vs. price return explains how large that gap can become.
What if I do not know my original cost basis?
You need it — the return is measured from what you paid, and a guess produces a guessed result. Old brokerage statements, trade confirmations and transfer-agent records are the usual sources, and if the shares have been through a split the per-share cost needs adjusting first. The guide on finding the cost basis of old stock walks through reconstructing it, and the stock split calculator handles the adjustment.
Does the calculator account for fees or taxes?
Only if you include them. Add commissions to the purchase price you paid and subtract them from the sale price you received, and the figures are net of fees. Taxes depend on your own circumstances — what is realized, what is not, how long each lot was held — and are outside what this page can tell you. For that, talk to a tax professional.
Does StoxDeck calculate annualized return for my holdings?
No. StoxDeck records every lot you enter with its date, share count and cost, prices the position live on every load, and shows gain and loss in dollars and percent measured from what you actually paid — across every brokerage in one place. Those are exactly the inputs this calculator needs, kept current for you, so the annualized figure is one paste away rather than a records hunt.
Is anything I enter here private?
It never leaves your browser. The calculator does the arithmetic locally — no values are transmitted, stored, or logged, and there is no account to create before using it.
Disclaimer. This calculator is informational only and is not investment, tax, or financial advice. It measures a return already earned on the figures you enter; it makes no forecast of future performance, and past returns do not indicate future results. StoxDeck is a portfolio-tracking tool, not a broker or an adviser. How any gain is taxed depends on your own circumstances — check with a professional.