Buying a stock and forgetting about it until you sell leaves one obvious question: how well did you actually do? The share price alone tells only half the story, because dividend-paying stocks hand you cash along the way that price charts quietly ignore. This stock return calculator takes your purchase price, sale price, number of shares, the dividends you collected, and how long you held the stock, then reports your total dollar gain, your percentage total return, and the annualized rate — the compound annual growth rate (CAGR).
Whether you are reviewing a winning position, comparing two past trades, or sanity-checking a broker's year-end statement, the numbers below make the math transparent.
How to Use
- Enter the Purchase Price Per Share — what you paid when you bought the stock. Use the average cost per share if you bought in batches.
- Enter the Sale Price Per Share — what you received per share when you sold. If you still hold the position, type the current market price to see your unrealized return.
- Set the Shares Owned — the number of shares you held over the period.
- Add the Total Dividends Per Share you received while holding the stock. Leave it at 0 for growth stocks that pay no dividend.
- Set the Holding Period in years. Partial years are allowed — for example, 1.5 means eighteen months.
- Read the result card: your Total Cost Basis, Net Sale Proceeds, Dividends Earned, Total Dollar Gain, Total Return percentage, and the Annualized Return (CAGR).
The highlighted Total Return is the percentage gain on every dollar you invested. The CAGR normalizes that return to a per-year rate so you can fairly compare a two-month flip against a ten-year hold.
The Formula Behind the Numbers
A stock's total return has two ingredients: price change and dividends. The price gain is what you earn as the share moves from your buy price to your sell price; dividends are the cash the company paid you along the way. Adding both gives the true economic result:
Total Return = (Sale Proceeds − Cost Basis + Dividends) ÷ Cost Basis
Where:
- Cost Basis = Purchase Price Per Share × Shares Owned.
- Sale Proceeds = Sale Price Per Share × Shares Owned.
- Dividends = Total Dividends Per Share × Shares Owned.
To turn that multi-year result into an annualized rate, the calculator uses the standard geometric mean — the CAGR formula:
CAGR = ((Sale Proceeds + Dividends) ÷ Cost Basis)^(1 ÷ Years) − 1
Worked example: you buy at $50, sell at $65, collect $2 per share in dividends, and hold for 2 years. Your cost basis is $5,000 on 100 shares, sale proceeds are $6,500, and dividends add $200. That is a $1,700 gain, or 34.0% total return. Annualized, ($6,700 ÷ $5,000)^(1/2) − 1 = 15.8% per year. Notice that the 34% over two years is not 17% per year — because gains compound, the true annual rate is 15.8%.
If the holding period is zero years, the CAGR cannot be computed (annualizing over no time is undefined), so the calculator shows only the total return. If the purchase price is zero or negative, the engine stops and asks for a positive cost basis, because dividing gain by zero cost would produce a meaningless number.
Total Return vs. Price Return
Investors often confuse price return with total return. The price return ignores dividends — it is simply (Sell − Buy) ÷ Buy. On the example above, price return alone is (65 − 50) ÷ 50 = 30%, while the total return including dividends is 34%. For high-yield stocks such as utilities, REITs, or dividend aristocrats paying 3–5% per year, the difference over a decade can be enormous: a stock that rose 50% in price while paying 4% a year actually delivered roughly 60–65% in total. Always compare like-for-like — use total return when benchmarking against the S&P 500, mutual funds, or CDs, because those published returns include reinvested dividends.
Examples
Example 1 — The textbook trade. You buy 100 shares at $50, sell at $65, collect $2 per share in dividends over 2 years. Cost basis $5,000, sale proceeds $6,500, dividends $200. Total dollar gain is $1,700, total return 34.0%, and annualized CAGR 15.8%.
Example 2 — A losing position. You buy 200 shares at $40, the stock falls to $30, but it paid $1 per share in dividends during the 2-year hold. Cost basis $8,000, sale proceeds $6,000, dividends $200. The loss is −$1,800, or −22.5% total return; the annualized CAGR is about −12.0%. The dividends soften the blow but do not prevent the loss.
Example 3 — A large position. You invest $1,000,000 (10,000 shares at $100), the stock rises to $110 over 3 years and yields $0.50 per share. Sale proceeds are $1,100,000 and dividends add $5,000. The total gain is $105,000, a 10.5% total return, annualized to roughly 3.4% per year — a reminder that even a six-figure position can produce a modest annualized result after three years.
Example 4 — A non-dividend growth stock. You buy 10 shares at $100, sell at $110, and never receive a dividend. Cost basis $1,000, sale proceeds $1,100, dividends $0. Total return is 10.0% over one year, and the CAGR matches at 10.0%.
FAQ
How is the total return on a stock calculated?
Total return equals (Sale Proceeds − Cost Basis + Dividends) ÷ Cost Basis. Cost basis is your purchase price times shares; sale proceeds is your sell price times shares; dividends are all cash distributions per share times shares. The result is a percentage that combines both price appreciation and dividend income.
What is the difference between total return and CAGR?
Total return is the overall percentage gain over the entire holding period, while CAGR (compound annual growth rate) expresses that gain as a smoothed per-year rate. A 34% two-year total return is not 17% per year — because of compounding, the CAGR is 15.8%. CAGR lets you fairly compare holdings of different lengths.
Do I include dividends in my stock return?
Yes. A dividend is real cash you received, so it belongs in your return. A stock that rose 10% and paid 3% dividends delivered a 13% total return, not 10%. Benchmarks such as the S&P 500 publish total-return figures that assume dividends are reinvested, so compare total to total.
How do I calculate my return if I bought shares at different prices?
Use the average cost per share: add up all money invested and divide by total shares owned. For example, 50 shares at $50 and 50 shares at $60 is $5,500 ÷ 100 = $55 average cost. Enter that average as your purchase price and the current or sale price as your exit price.
What is a good annualized return for a stock?
Over the long run, the US stock market averages roughly 10% per year in total return (about 7% after inflation). Beating that consistently is difficult; many professional managers underperform the index. A single winning trade at 15% per year over a multi-year holding period is strong, but one lucky year tells you little about skill.
How are fees and commissions treated?
This calculator models price and dividend return. For the most accurate result, subtract any trading commissions and account fees from the sale proceeds, or add them to the cost basis. A $10 commission on a small position can noticeably dilute a percentage return, so always include it for high-frequency or tiny trades.
Why is my CAGR negative even though I made money on price?
If your sale price is below your average cost, the price component is negative. Dividends can reduce the loss, but they cannot flip a capital loss into a gain unless they exceed the price decline. Enter your actual sale price and dividends to see the true combined result.
Disclaimer
This stock return calculator is provided for informational purposes only and does not constitute financial, investment, tax, or legal advice. Results are based solely on the figures you enter and the standard total-return and CAGR formulas; they do not account for trading commissions, taxes on dividends or capital gains, inflation, or fees. Past returns are not indicative of future performance. Always verify your actual results with your brokerage statement and consult a qualified financial professional before making investment decisions.