Audited 26 Jul 2026·Last updated 28 Oct 2026·8 citations·Tier 1·0 uses

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

Total shares purchased. Fractional shares are allowed for brokers that support them.
Your per-share entry price, before commissions. For a multi-lot position, use your weighted-average cost basis.
$
Per-share price at exit, or the current market price if you have not sold. Use the closing price for unrealised positions.
$
Cumulative cash dividends received per share over the entire holding period (sum, not annual). Enter 0 for non-dividend stocks.
$
Combined buy + sell commissions, SEC fees, and regulatory transaction fees. Most US retail brokers now charge $0 for equity trades.
$
Time held in years. Use decimals for partial years — 0.5 for six months, 0.0833 for one month.
yrs
Total return
50.00
The whole gain or loss as a percentage of what you paid, including dividends and after fees, over the full holding period rather than per year.
Absolute return
$2,500.00
Annualized return (CAGR)
50.00%
Capital gain
$2,500.00
Total dividends received
$0.00
Annualized dividend yield
0.00%

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.

  1. Enter the number of shares. Fractional shares are fine if your broker sells them.
  2. 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.
  3. Enter the sale price per share, or today's closing price if you still hold the stock.
  4. 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.
  5. 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.
  6. 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.

Return = (Proceeds−Cost)⁄Cost, CAGR = (Proceeds⁄Cost)^(1⁄n) − 1

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.

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.

shares100
sale Price75
dividends Per Share0
commission0
purchase Price50
holding Years1

Frequently asked questions.

Why does the annual return fall so much when I hold longer for the same profit?
Because the same overall growth is spread across more years, and compounding makes the yearly rate needed to produce it shrink quickly. Doubling your money, a 100% total return, is 41.42% a year over two years but only 3.53% a year over twenty. Total return answers how much you made; the annual rate answers how hard the money worked.
Why is the annualised figure enormous on a stock I held for a few weeks?
For holdings shorter than a year, the annual rate assumes the same pace continues for a whole year and compounds it. A 10% gain in three months becomes 46.41% a year; a 5% gain in six months becomes 10.25%. That is arithmetically correct but rarely repeatable, so for short trades the total return is the more meaningful figure.
I reinvested my dividends. What should I enter?
Leave dividends at 0 and work from the value of everything you hold at the end. Divide that ending value by your original share count and enter the result as the sale price. If 100 shares bought at $50 grew through reinvestment to 108 shares worth $75 each after five years, enter a sale price of $81: the total return is 62% and the annual rate about 10.13%.
I bought at several different times. Is the annual rate still right?
The total return is, if you enter your weighted-average cost. The annual rate is not, because it assumes all the money went in on day one. Money added later had less time to grow, so a single CAGR understates how well the later purchases did. For several purchases or sales over time, a money-weighted return, the IRR or XIRR function in a spreadsheet using the actual dates, is the right tool.
How much of the return will I keep after US tax?
Gains on shares held more than one year, and qualified dividends, are taxed at 0%, 15% or 20% depending on income, plus a 3.8% net investment income tax for higher earners. Shares held a year or less are taxed at ordinary income rates, up to 37%. At 15%, the example's $2,500 gain leaves $2,125, or 42.5% on $5,000. Gains inside an IRA or 401(k) follow that account's rules instead.
How do I turn the annual return into a real, inflation-adjusted one?
Divide one plus the annual return by one plus the inflation rate and subtract one. Subtracting the rates is close but not exact. An 8.45% annual return in a period when prices rose 3% a year is a real return of 1.0845 ÷ 1.03 − 1, about 5.29% a year, which is what actually happened to your buying power.
Why does a stock's average yearly return differ from its CAGR?
An arithmetic average ignores compounding, and volatility makes the two drift apart. A stock that gains 50% one year and loses 50% the next averages 0%, yet $100 becomes $150 and then $75, a 13.40% annual loss. The CAGR is the figure that matches the money you actually ended up with.
How much do trading fees change the result?
The full fee comes off your dollar gain. With $10 of commissions on the example trade, the dollar return drops from $2,500 to $2,490, and the total return from 50% to about 49.75%. On a large position that is trivial; on a small or frequently traded one it is not. Ongoing costs such as fund expense ratios or advisory fees are not entered here, and they compound: a 1% yearly fee that turns 10% a year into 9% leaves about 24% less money after 30 years.
How should I judge a single stock's return?
Against what a broad index fund returned over the same dates, dividends included. Single stocks are far more uneven than the market: Hendrik Bessembinder's 2018 study found that just 4% of US listed companies accounted for all of the stock market's net wealth creation over Treasury bills from 1926 to 2016, and most individual stocks returned less than Treasury bills over their lifetimes.
Can I use this for shares I have not sold yet?
Yes. Enter today's closing price as the sale price and the time held so far. The result is an unrealised, or paper, return: it changes daily, no tax is due until you sell, and selling may involve fees not yet counted. In the US, the purchase price you paid plus commissions is your cost basis for tax when you do sell.

How this page was produced

Published by
Quanta Calculator
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.

Embed

Quanta Pro

Paid features are coming later.

  • All 1560 calculators remain free
  • No billing is enabled
Coming soon