TL;DR
A stock return calculator measures total return (price change plus dividends) and CAGR (the steady yearly rate that links your start and end values). Price change alone understates what dividend payers delivered, and total return alone hides how long it took.
Key Takeaways
- 1.Total return equals ending value plus dividends, minus starting value, divided by starting value.
- 2.CAGR is (ending value / starting value) raised to 1/years, minus 1, and it makes different holding periods comparable.
- 3.A 50% loss needs a 100% gain to break even, so drawdowns hurt more than the headline number suggests.
- 4.Inflation and taxes shrink your real return, so check the after-inflation figure before judging a result.
- 5.Use XIRR instead of CAGR whenever you added or withdrew money along the way.
A stock return calculator tells you how much a holding gained or lost by combining its price change, any dividends received and the time you held it. The two numbers to read are total return, which is the whole-period percentage, and CAGR, which is the same result expressed as a yearly rate.
I check returns this way on every position I keep for more than a few months, because the broker's headline gain figure often leaves out dividends, ignores timing and flatters a lucky year. This guide gives you the formulas, three worked examples you can verify with a basic calculator, and the mistakes that make people think a stock did better or worse than it did. All examples use round numbers, not real tickers, so the arithmetic is easy to follow and copy into your own sheet.
What is total return on a stock?
Total return is the full percentage change in your wealth from owning a stock: price appreciation plus every dividend paid, divided by what you started with. It answers one question, how much more or less money do I have than when I began, without saying how long it took.
The formula is (ending price + dividends received - starting price) / starting price. Say you buy at $50 and the stock reaches $62 three years later, paying $1.20 per share each year. Dividends total $3.60. The gain is $12 in price plus $3.60 in dividends, or $15.60 on a $50 start. That is a 31.2% total return, compared with only 24% if you looked at price alone.
The gap between those two numbers is why dividend stocks look weaker on a plain price chart than they actually performed. Most charting platforms, including TradingView, plot price only by default, so a utility or consumer staples stock can seem to lag when its dividends are quietly closing the gap.
Reinvested or not
The example above assumes dividends were kept as cash. If you reinvested them, shares compound and the result rises slightly. Calculators usually offer a reinvest toggle, and it matters most on high-yield names held for many years.
Here is a second case. A stock yields 4% and its price stays flat for ten years. A price chart shows a boring line at 0%, yet the owner collected about 40% in cash and earned roughly 3.5% a year before reinvestment. Compare that with a no-dividend stock that rose 30% over the same decade, a CAGR of only 2.7%. The flat chart actually won, and only a total return calculation reveals it.
Total return is the only fair starting point for comparing a dividend payer with a growth stock, because it counts every dollar the investment actually put in your account.
How do you calculate CAGR for a stock?
CAGR, or compound annual growth rate, is the constant yearly rate that would take your starting value to your ending value over the holding period. The formula is (ending value / starting value) raised to the power of 1 divided by the number of years, minus 1.
Take a $10,000 investment that grows to $18,500 in five years. Divide to get 1.85, raise it to the 0.2 power to get about 1.131, and subtract 1. The CAGR is roughly 13.1% per year. Use the earlier dividend example: a 31.2% total return over three years is 1.312 to the one-third power, which is about 9.5% per year.
| Example | Start | End | Years | CAGR |
|---|---|---|---|---|
| Price only | $10,000 | $18,500 | 5 | About 13.1% |
| With dividends | $50 per share | $62 plus $3.60 dividends | 3 | About 9.5% |
| Slow compounder | $10,000 | $13,400 | 4 | About 7.6% |
| Flat then jump | $10,000 | $20,000 | 7 | About 10.4% |
CAGR smooths out the bumps. A stock that fell 30% one year and jumped 60% the next has a clean arithmetic average of 15%, but its true CAGR is only about 6.6%, because $10,000 becomes $7,000 and then $11,200. That difference is why serious investors rely on CAGR instead of averaging yearly returns.
Use CAGR the other way around as well. If you need $100,000 in ten years and have $50,000 today, you need the required rate: 2 raised to the 0.1 power, minus 1, which is about 7.2% per year. Working backward like this tells you whether a goal needs realistic returns or a heroic stock pick, and it costs nothing to check before committing money.
Doubling an investment in seven years requires a CAGR of about 10.4%, which is close to the long-run nominal return commonly cited for the S&P 500 since the late 1950s.
Why do losses need bigger gains to recover?
Percentage math is asymmetric. A 50% loss needs a 100% gain to get back to even, because $10,000 that falls to $5,000 has to double. The deeper the drawdown, the steeper the climb, and the more a calculator's recovery figure matters for risk planning.
| Loss from peak | Gain needed to recover |
|---|---|
| 10% | 11.1% |
| 20% | 25% |
| 30% | 42.9% |
| 50% | 100% |
| 70% | 233% |
The recovery formula is 1 / (1 - loss) - 1. At a 30% loss, that is 1 / 0.7 minus 1, or 42.9%. Many traders use this table to set a maximum acceptable drawdown before they enter a position, then size the trade so a stop-out never lands in the painful part of the curve.
Recovery time compounds the problem. At a 10% annual return, a 50% loss takes about 7.3 years to recover on its own, and a 20% loss takes roughly 2.3 years. If you're still adding money, the math improves, but you shouldn't count on it.
Survivorship
Return calculators only see stocks that still trade. Companies that were delisted or went to zero rarely appear in the examples people share, which makes typical outcomes look better than they were.
Position sizing connects directly to this table. If you risk 1% of your account per trade and stop out ten times in a row, you are down about 9.6%, which needs a 10.6% gain to recover. Risk 5% per trade through the same losing streak and you are down about 40%, which needs a 66.7% gain. Same strategy, same losses, very different recovery road.
Because a 50% drawdown requires a 100% rally to recover, controlling losses is mathematically worth more than chasing a few extra points of upside.
How do inflation and taxes change your real return?
Nominal return is the number on your statement. Real return is what is left after inflation, and after-tax return is what is left after you pay the government. The formula for real return is (1 + nominal) / (1 + inflation) - 1, not a simple subtraction.
If your portfolio returned 9% in a year when inflation ran 3%, your real return is 1.09 / 1.03 minus 1, which is 5.8%, a little under the 6% you would get by subtracting. The gap widens as inflation rises. At 8% inflation, a 9% nominal return is only about 0.9% in real terms.
Taxes come next. Dividends and long-term gains in the US are generally taxed at 0%, 15% or 20%, while short-term gains are taxed as ordinary income at up to 37%. A 12% pre-tax return taxed at 15% leaves 10.2%, and the same return taxed at 24% leaves 9.1%. Holding in an IRA or 401(k) changes that picture, since gains inside the account are not taxed until withdrawal in a traditional account.
- Start with total return, including dividends
- Convert to CAGR for the holding period
- Subtract inflation using the real-return formula
- Apply your expected tax rate on gains and dividends
- Subtract any trading commissions and fund fees
- Compare the final number against a simple index fund over the same dates
Do not forget account type. Dividends in a taxable account are taxed in the year you receive them, even if you reinvest. Qualified dividends get the lower long-term rates, while dividends from many REITs are taxed as ordinary income. Calculators that skip this distinction can overstate the after-tax result for income-heavy portfolios by a full percentage point or more.
A 9% nominal return with 3% inflation and a 15% tax rate on gains leaves a real, after-tax return nearer 4.5%, which is the number that actually compounds your purchasing power.
When should you use XIRR instead of CAGR?
Use XIRR when you made more than one deposit or withdrawal. CAGR assumes a single lump sum at the start and a single value at the end. Real portfolios rarely behave that way, and ignoring contribution timing can overstate or understate your result by several points.
XIRR, available in Google Sheets and Excel as XIRR(values, dates), weights each cash flow by the date it happened. Suppose you invest $5,000 on January 1 and another $5,000 on July 1, and the account is worth $11,000 on December 31. Simple math says a 10% gain on $10,000, but your second $5,000 was invested only half the year, so the annualized return is closer to 13%, because the second $5,000 was exposed for only half the year.
Calculate XIRR in a spreadsheet
- 1
List every cash flow
Put deposits as negative numbers and withdrawals as positive numbers in one column, each with its date in the next column.
- 2
Add the ending value
Enter the current account value as a positive number on today's date.
- 3
Apply the formula
Type =XIRR(values, dates) and read the annualized percentage. Compare it to the same dates in a benchmark fund.
- 4
Check the sign convention
If you see an error, confirm that at least one value is negative and one is positive. XIRR can't solve a column of one sign.
A good habit is to record every deposit as it happens. Most brokers export an activity file that lists transfers and dividends by date, so the XIRR setup takes a few minutes instead of an evening. Once the sheet exists, updating it each month is just one new row.
If you add money on a schedule, XIRR is the only common formula that gives an honest annualized figure, which is why brokerages quote it as a money-weighted return.
What mistakes make a return look better than it was?
The biggest error is mixing time periods. A 40% gain over six years sounds good until you realize it is a 5.8% CAGR, below what many bond funds paid in recent years. Always convert to a yearly rate before comparing anything.
Pros
- CAGR makes unequal holding periods comparable
- Total return captures dividends that price charts hide
- XIRR handles deposits and withdrawals correctly
- Real return shows what you can actually spend
Cons
- CAGR hides volatility along the way
- Total return alone ignores how long you held
- Backtested or screenshotted gains rarely include fees and taxes
- Past returns don't predict the next year's result
The second mistake is cherry-picking dates. Measuring from a market bottom flatters almost any holding. Pick start and end dates for a reason you can explain, such as your actual purchase and sale, and use the same dates for your benchmark. Third, fees: a 1% annual fund fee on a 7% return is a 14% haircut to your result, and it compounds.
Fourth, watch for stock splits. A 2-for-1 split halves the price without changing value, and some free tools mishandle it, producing a fake 50% loss. Use adjusted close prices, which most data providers supply, and sanity-check any surprising number against your broker statement.
Comparing an apples-to-apples CAGR against an index fund over the exact same dates is the single most reliable test of whether a stock earned its place in your portfolio.
What to do next
Open your broker's holdings page and pull three numbers for your biggest position: purchase date, cost basis and dividends received. Plug them into the formulas above, calculate total return and CAGR, and compare the CAGR to a broad index fund over the same dates. That ten-minute exercise tells you whether stock picking is adding anything.
If you want to automate it, a Google Sheet with GOOGLEFINANCE price pulls and an XIRR formula handles most portfolios for free. A trading journal such as Tradervue or TradeZella adds per-trade statistics on top. Whichever route you pick, record the dates and the dividends, because those are the two inputs most people skip.
Total return, CAGR and a real-return adjustment together answer the only question that matters about a holding: how many extra dollars of purchasing power did it deliver per year, compared with the simple alternative.
Keep reading
Get smarter trades, weekly
One short email every Sunday. AI workflows, tool reviews, and trader productivity tips.
