Stock Return Calculator
✦ Finance & MoneyCalculate a stock trade's profit or loss from shares, buy and sale prices, commissions and cash dividends — then see price return, total return, annualised CAGR, break-even sale price and an inflation-adjusted result.
- ✓ Calculated in your browser
- ✓ Nothing you type is stored
- ✓ No sign-up required
- ✓ Formula and sources shown
The formula
Stock price return and total return with cash dividends
Cost basis = Shares x Purchase price + Purchase commission
Net sale proceeds = Shares x Sale price - Sale commission
Total received = Net sale proceeds + Cash dividends
Total return = (Total received - Cost basis) / Cost basis
CAGR = (Total received / Cost basis)^(1 / Years) - 1
Dividends are included only as cash received; this page does not model dividend reinvestment, taxes, stock splits, rights issues or exchange-rate effects. Prices and commissions are manual inputs, not live market data.
Calculating it by hand
- Multiply the number of shares by the purchase price per share, then add the purchase commission to find the cost basis.
- Multiply the same number of shares by the sale price per share, then subtract the sale commission to find net sale proceeds.
- Add any cash dividends received to net sale proceeds to find total value received.
- Subtract cost basis from total value received to find the net gain or loss.
- Divide that gain or loss by cost basis for total return, and use the holding period to calculate CAGR when total value received is positive.
Worked examples
100 shares bought at $50 and sold at $65, with $4.95 commissions and $180 cash dividends over three years
Cost basis = 100 x $50 + $4.95 = $5,004.95Net sale proceeds = 100 x $65 - $4.95 = $6,495.05; total received = $6,495.05 + $180 = $6,675.05Total return = ($6,675.05 - $5,004.95) / $5,004.95 = 33.37%; CAGR = ($6,675.05 / $5,004.95)^(1 / 3) - 1 = 10.07%
Net gain: $1,670.10; price return: 29.77%; total return: 33.37%; annualised return: 10.07%.
50 shares bought at $80, sold at $70, no commissions and $100 cash dividends after two years
Cost basis = 50 x $80 = $4,000; net sale proceeds = 50 x $70 = $3,500Total received = $3,500 + $100 = $3,600; net gain = $3,600 - $4,000 = -$400Price return = -$500 / $4,000 = -12.50%; total return = -$400 / $4,000 = -10.00%; CAGR = ($3,600 / $4,000)^(1 / 2) - 1 = -5.13%
Net loss: $400.00, an annualised -5.13%; the cash dividends reduced the loss but did not erase it.
10.5 shares bought at $100 and sold at $110 after one year, no dividends or commissions
Cost basis = 10.5 x $100 = $1,050; total received = 10.5 x $110 = $1,155Total return = ($1,155 - $1,050) / $1,050 = 10.00%Because the holding period is one year, annualised return equals total return: 10.00%
Net gain: $105.00; total and annualised return: 10.00%.
Methodology
How stock return is calculated
A quoted share-price change is only one part of your result. Commissions change your actual cost, cash dividends add to what you received, and time converts a total gain into a yearly rate — each step shifts the number materially.
Read sources and limitsHow is a stock return different from a change in share price?
A stock return is the gain or loss on a share trade once the shares, buying and selling costs and any cash dividends are counted, in dollars and as a percentage of your cost basis. A rise from $50 to $65 is a $15 price move per share; the return is that move, less costs, plus dividends.
The tool separates price return from total return. Price return compares net sale proceeds with your cost basis and leaves dividends out; total return adds the cash dividends you received. Two stocks with the same price rise can give investors different results if only one paid dividends. The page assumes dividends were taken as cash — if they were reinvested, the extra shares are already in the sale value, and a dividend-reinvestment calculation fits better.
Why do cost basis and commissions still matter?
Cost basis here is the share purchase plus any commission or other known buying cost; net sale proceeds are the sale amount less the selling commission. Entering both makes the percentage reflect the cash you actually committed and received. Even with zero-commission brokers, spreads, regulatory charges or currency conversion can apply.
Avoid double counting. If your broker's sale figure is already net of selling charges, enter it as the sale price and leave the sale commission at zero. Enter only the cash dividends you actually received; dividends reinvested into more shares are already reflected in the final share count and value.
What is the difference between total return and annualised return (CAGR)?
Total return is the whole percentage gain or loss over the holding period, with no regard for time: 30% over one year and 30% over ten years are both 30% total returns. Annualised return (CAGR) is the constant compound yearly rate that turns the cost basis into the total received over the same period.
CAGR is the better measure for comparing holdings of different lengths, but it is not a prediction: it assumes a smooth path, while share prices move irregularly. It is unavailable when the total received is zero, because no real-valued CAGR exists for a zero ending value; the calculator still shows the dollar loss and the -100% total return.
What does the break-even sale price tell me?
The break-even sale price is the lowest price per share at which selling would recover your cost basis, after the cash dividends you have already received and the cost of selling: (cost basis - cash dividends + sale commission) / shares. Above it the position is in profit at that price; below it you have not yet recovered your investment.
It moves as dividends arrive. Each dividend payment lowers the break-even, because it is cash you have already recovered. With a $5,004.95 cost basis, $180 of dividends on 100 shares and a $4.95 selling commission, the break-even is $48.30 a share — $1.80 below the $50.10 it would be with no dividends.
What does a stock return leave out?
The optional inflation field converts the nominal CAGR into an inflation-adjusted one using a single constant rate, so it illustrates purchasing-power change rather than reconstructing history. Taxes, margin interest, splits, spinoffs, currency effects and the timing of dividend payments are outside this tool, and each can change a real-world result.
A positive return is not, by itself, evidence that a holding was a good choice. Return leaves out risk, concentration, volatility, liquidity and your own goals, and one past result is not a forecast. This calculator provides educational estimates based on the values you enter. It is not investment, tax, legal or financial advice.
Was my stock return better than the market?
A stock return means most next to a benchmark over the same dates. For a US large-company stock that is usually the S&P 500 total return index, which includes reinvested dividends. Compare your annualised total return with the index's annualised return between your purchase and sale dates; if the index did better, a passive fund would have beaten the stock.
This page does not fetch index data, but the same formula works: enter the total-return index level on your purchase date as the purchase price and on your sale date as the sale price, with one share, no commissions and no dividends, and read the CAGR. Research on US stocks since 1926 found that most individual shares returned less than one-month Treasury bills over their lifetimes, with the market's gains concentrated in a small number of stocks (Bessembinder, 2018) — the reason benchmarking matters.
Stock Return questions
How do I calculate stock profit?
Multiply the shares by the purchase price and add any buying commission to get the cost basis. Multiply the shares by the sale price and subtract the selling commission to get net sale proceeds, then add cash dividends received. The total less the cost basis is the net gain or loss; divide it by the cost basis for the total return.
What is the difference between price return and total return?
Price return measures only the change from your cost basis to net sale proceeds. Total return adds the cash dividends you received. For a stock that paid no dividends the two are identical; for a dividend payer they can differ a lot. Total return is the right measure of what the position paid you: in the first example it is 33.37%, against a 29.77% price return.
How do I calculate stock return with dividends?
Enter the total cash dividends you received and did not reinvest in Cash dividends received; the calculator adds them to net sale proceeds before working out total return and CAGR. Do not enter reinvested dividends: the extra shares they bought are already in your ending share count and value, so they would be counted twice.
How do I calculate CAGR for a stock?
Divide the total received (net sale proceeds plus cash dividends) by the cost basis, raise the ratio to the power of 1 / years held, and subtract 1. In the first example: ($6,675.05 / $5,004.95)^(1 / 3) - 1 = 10.07% a year. The formula needs a total received above zero; a complete loss has no meaningful CAGR.
Why is my annualised return lower than my total return divided by the years?
Because CAGR compounds: 33.37% over three years is 10.07% a year, not 11.12% (33.37 / 3). Dividing by the years gives an arithmetic average that ignores compounding and overstates the annual rate. For a one-year holding period the two figures are the same.
What is the break-even sale price for a stock?
The lowest price per share at which selling recovers your whole cost basis, after the cash dividends already received and the cost of selling: (cost basis - cash dividends + sale commission) / shares. With a $5,004.95 cost basis, $180 of dividends, a $4.95 sale commission and 100 shares, it is $48.30 — each dividend lowers it.
How do I compare my stock return to the S&P 500?
Take the annualised total return from this page, then find the S&P 500 total return index (which includes reinvested dividends) on your purchase and sale dates. Divide the ending level by the starting level, raise to 1 / years and subtract 1. If the index's annualised return is higher, a passive index fund would have done better over the same period, before tax.
Does this calculator show after-tax stock return?
No. It does not calculate capital-gains tax, dividend tax, wash-sale adjustments, margin interest or foreign withholding. For a rough after-tax figure, subtract the tax on the gain and on the dividends from the total received. US long-term gains are taxed at 0%, 15% or 20% and short-term gains at ordinary income rates (IRS Topic 409); qualified dividends get the long-term rates.
Can I use the current share price instead of a sale price?
Yes. Enter today's quote as the sale price for a mark-to-market estimate of an open position — the return you would have if you sold at that price. A quote can differ from the price you would actually get because of the spread, market impact or after-hours moves, and the calculator does not fetch or check prices.
Does this calculator account for stock splits?
No. If the company has split its shares since you bought, convert your share count and purchase price to the post-split basis before entering them: after a 2-for-1 split, enter twice the shares at half the original price. The cost basis is unchanged; the calculator uses only the values you enter.
How do I calculate my return if I bought shares at different prices?
Add up what you paid for every lot, including commissions, and divide by the total shares for your average cost. 100 shares at $40 ($4,000) plus 50 at $52 ($2,600) is $6,600 for 150 shares, an average of $44.00. Selling all 150 at $60 brings $9,000: a $2,400 gain and a 36.4% total return. Enter 150 shares at $44 to reproduce it.
How do I calculate the gain if I only sold part of my position?
Match the shares sold with a cost basis for those shares. Using the average cost above, 50 shares have a basis of $2,200; sold at $60 for $3,000, the gain is $800. Using first-in, first-out — the IRS default when you do not identify the shares (Publication 550) — they come from the $40 lot, so the basis is $2,000 and the gain $1,000. The unsold shares keep the rest of the basis.
Source notes
Method, sources & limitations
Every figure on this page comes from the formula above applied to the values you enter. Nothing is estimated from market data, and no result is a forecast. These are the sources behind the method and any fixed figures it uses:
- FINRA — Calculating Your Investment Returns
- FINRA — Fees and Commissions
- U.S. Securities and Exchange Commission (Investor.gov) — Understanding Fees
- IRS Topic No. 409 — Capital gains and losses
- IRS Publication 550 — Investment Income and Expenses (identifying shares sold)
- Bessembinder, H. (2018). Do stocks outperform Treasury bills? Journal of Financial Economics 129(3), 440–457
Educational information only. Results are estimates produced from the assumptions you enter, and are not financial, tax, legal or medical advice. Check anything that matters against a qualified professional and the cited sources.