Stock Return Calculator
Total return and annualised return (CAGR) on a stock from shares, buy and sell prices, dividends, fees and years held, split into price gain and dividends.
Stock Return Calculator
Background.
Buy 100 shares at $50, sell them at $75, and you have made $2,500 on $5,000: a 50% return. Whether that was a remarkable trade or an ordinary one depends on something the profit hides, which is how long the money was tied up. Held for one year, 50% is exceptional. Held for five years, it works out to about 8.45% a year. Held for twenty, it comes to about 2.05% a year.
That is why two figures come back here, not one. Total return is the whole gain or loss as a percentage of what you paid, over however long you held the shares. The annualised return, or compound annual growth rate (CAGR), converts that into the steady yearly rate that would have produced the same result, so a stock held for eight months and another held for six years can be compared on equal terms.
Price is only part of a stock's return. A company that pays dividends hands you cash along the way, and over a long holding those payments can add a meaningful share of the total. Commissions and fees work in the other direction. Both are included: dividends are added to what you got back, and fees are taken off, half on the purchase and half on the sale. The capital gain from price alone and the dividends are also shown separately, so you can see which one did the work.
The calculation assumes one purchase and one sale. Dividends are counted as cash received rather than reinvested, the figures are before tax, and they are in nominal dollars, not adjusted for inflation. The questions below show how to handle reinvested dividends, several purchases at different prices, tax and inflation.
What is stock return calculator?
A stock's total return over a holding period, called the holding-period return in finance textbooks, is the price change plus the dividends received, divided by the price paid: (sale price − purchase price + dividends) ÷ purchase price. It has two parts. The capital gain, or loss, comes from the share price moving; the income return comes from dividends. Total return says nothing about time, so it cannot rank a one-year holding against a five-year one. The compound annual growth rate does: it is the single yearly rate that, compounded over the holding period, turns what you paid into what you got back. For exactly one year the two figures are equal. For longer holdings the annual rate is lower than the total return; for shorter ones it is higher, because it extrapolates the result to a full year.
The same distinction shows up in market indexes. The S&P 500 level quoted in the news is a price index: it tracks share prices only. A separate total-return version assumes every dividend is reinvested, and over long periods it pulls well ahead of the price index. When you compare your own result with an index, use the total-return version, or you will be measuring your dividends against a benchmark that has none.
How to use this calculator.
- Enter the number of shares. Fractional shares are fine if your broker sells them.
- Enter the purchase price per share before commissions. If you bought in several lots, the weighted-average cost on your broker's statement gives the right total return, but read the question on multiple purchases before trusting the annual rate. If the stock split while you held it, put the share count and prices on the same footing: 100 shares bought at $50 before a 2-for-1 split are 200 shares at a cost of $25 each.
- Enter the sale price per share, or today's closing price if you still hold the stock.
- Enter the total dividends per share received over the whole holding, not the annual dividend: a stock paying $0.50 a quarter for two years means 8 × $0.50 = $4.00. Enter 0 for a stock that pays none.
- Enter all commissions and fees for the purchase and the sale combined; with most US online brokers now charging no commission on stock trades, this is often 0.
- Enter the holding period in years, using decimals for parts of a year: 0.5 for six months, 0.25 for three, 0.0833 for one month. The shortest period accepted is 0.0027 years, about one day.
The formula.
Cost is what you paid: shares × purchase price + half of the commissions. Proceeds are what you got back: shares × sale price − the other half of the commissions + shares × dividends per share. The dollar return is proceeds − cost, and the total return is that figure divided by cost, times 100. Splitting the fees evenly between purchase and sale means the whole fee comes off the dollar return; only the base the percentage is measured against shifts slightly.
The annualised return is CAGR = (proceeds ÷ cost)^(1 ÷ years) − 1, times 100. Taking the n-th root spreads the overall growth evenly across the years: if $5,000 became $7,500 over five years, the ratio is 1.5 and its fifth root is about 1.0845, or 8.45% a year. A loss gives a ratio below 1 and a negative annual rate. In the rare case where fees exceed everything received from the sale, the ratio would turn negative and no annual rate exists, so the calculator stops with a message pointing at the commission figure; if the sale leaves exactly nothing, the CAGR is −100%.
The capital gain is shares × (sale price − purchase price): price movement only, with neither dividends nor fees. Total dividends are shares × dividends per share. The dividend yield shown is the dividends as a percentage of the original purchase value, divided by the years held, which makes it an average yield on your cost per year. It is not the yield quoted on financial websites, which divides the current annual dividend by today's share price.
Dividends are added to the proceeds as if all of them arrived on the day you sold. Dividends received earlier could have been reinvested and earned more, so for long holdings in steady dividend payers the figures here are slightly conservative.
A worked example.
The example uses 100 shares bought at $50, sold at $75 one year later, with no dividends and no fees. Cost is 100 × 50 = $5,000 and proceeds are 100 × 75 = $7,500, so the dollar return is 7,500 − 5,000 = $2,500 and the total return is 2,500 ÷ 5,000 = 50%. Over exactly one year there is nothing to spread out: (7,500 ÷ 5,000)^(1 ÷ 1) − 1 = 0.5, so the CAGR is also 50%. All $2,500 is capital gain, and the dividend lines read zero. Dividends change the picture once the holding is longer. Suppose the same shares were held for five years and paid $2.00 per share in total over that time. Total dividends are 100 × 2 = $200, proceeds rise to 7,500 + 200 = $7,700, and the total return becomes 2,700 ÷ 5,000 = 54%. The annual rate is (7,700 ÷ 5,000)^(1 ÷ 5) − 1 = 9.02% a year, and the dividend yield on cost is 200 ÷ 5,000 ÷ 5 = 0.8% a year.
Frequently asked questions.
Why does the annual return fall so much when I hold longer for the same profit?
Why is the annualised figure enormous on a stock I held for a few weeks?
I reinvested my dividends. What should I enter?
I bought at several different times. Is the annual rate still right?
How much of the return will I keep after US tax?
How do I turn the annual return into a real, inflation-adjusted one?
Why does a stock's average yearly return differ from its CAGR?
How much do trading fees change the result?
How should I judge a single stock's return?
Can I use this for shares I have not sold yet?
References& sources.
- [1]Bodie, Z., Kane, A., & Marcus, A. J. (2024). Investments (12th ed.), Chapter 5: Risk, Return, and the Historical Record — defines holding-period return (HPR) as (end price − begin price + dividends) / begin price.
- [2]CFA Institute — Equity Investments curriculum: Total Return decomposition (capital gain return + dividend yield) and time-weighted vs money-weighted return measurement.
- [3]U.S. Securities and Exchange Commission (Investor.gov) — Total Return: glossary entry defining total return as price appreciation plus reinvested dividends/interest.
- [4]FINRA Investor Education Foundation — Understanding Investment Performance: total return, annualized return, and the role of dividends in long-run equity performance.
- [5]Sharpe, W. F. (1964). "Capital Asset Prices: A Theory of Market Equilibrium under Conditions of Risk." Journal of Finance, 19(3), 425–442 — foundation of CAPM and the framework for risk-adjusted return measurement.
- [6]U.S. Securities and Exchange Commission — Compound Annual Growth Rate (CAGR), Investor.gov glossary entry.
- [7]Bessembinder, H. (2018). "Do stocks outperform Treasury bills?" Journal of Financial Economics, 129(3), 440–457 — empirical evidence on the long-tailed distribution of individual stock returns.
- [8]IRS Publication 550 (2024) — Investment Income and Expenses: cost-basis rules, qualified dividends, and capital gains tax treatment for US taxable accounts.
How this page was produced
- Published by
- Quanta Calculator
- Overseen by
- Daniel, Quanta Calculator Researcher
- Primary sources
- 8 cited below
- Method
- Return = (Proceeds−Cost)⁄Cost, CAGR = (Proceeds⁄Cost)^(1⁄n) − 1
- Published
- Last verified
Built with AI assistance and verified by automated tests against the cited sources — every worked example on this page is computed by the same code that runs the calculator. How we build and check calculators.
In this category
Embed
Quanta Pro
Paid features are coming later.
- All 1560 calculators remain free
- No billing is enabled