Stock Return Calculator
Total return on a stock including dividends.
Formula
Return = (Sell×Shares+Div) – (Buy×Shares)
Example
100 shares at $50→$65 + $200 div → $1,700 profit.
Embed this calculator on your site
Add this free calculator to your own website with one line of code. The embedded version is responsive, ad-free, and includes a small attribution link back to CalcNest AI.
<iframe src="https://calcnestai.com/embed/stock-return-calculator.html" width="100%" height="700" frameborder="0" style="border: 1px solid #e5e5e5; border-radius: 12px; max-width: 720px;" loading="lazy" title="Stock Return Calculator — Free Tool by CalcNest AI"></iframe>
Understanding the Stock Return Calculator
A stock return calculator works out what a trade actually made once dividends are counted, and expresses it as a percentage of what you put in. Most people track the price they bought at and the price they sold at, and stop there. Leaving dividends out understates long-term returns substantially, and ignoring the holding period makes wildly different trades look identical.
How it actually works
Enter the buy price per share, the sell price per share, the number of shares, and total dividends received. The calculator multiplies buy price by shares for your cost, multiplies sell price by shares and adds dividends for total revenue, then reports the profit and expresses it as a percentage of cost. Buying 100 shares at $50 and selling at $60 with $250 in dividends gives a $5,000 cost, $6,250 revenue, $1,250 profit, and a 25% total return.
| Holding period | Total return | Annualised return |
|---|---|---|
| 6 months | 25% | 56.3% |
| 1 year | 25% | 25.0% |
| 3 years | 25% | 7.7% |
| 10 years | 25% | 2.3% |
The deeper context most people miss
That table is the thing most return calculations miss. A 25% gain is excellent over six months and poor over ten years, and the raw percentage cannot tell them apart. Over a decade, 2.3% a year has probably lost to inflation and would have been beaten comfortably by a broad index fund or even a decent savings account. Any time you compare two investments, convert to an annualised figure first, because total return without a time period attached is close to meaningless.
Why dividends matter far more than most investors assume
There's a persistent tendency to treat dividends as a pleasant extra rather than a core component of return, and the historical record argues strongly against that. Over long periods, reinvested dividends have accounted for a very substantial share of the total return from broad equity markets, with various studies of the S&P 500 attributing somewhere around a third to a half of cumulative long-run returns to dividends and their reinvestment, depending on the period measured. The mechanism is compounding: a dividend reinvested buys additional shares, which themselves pay dividends, which buy more shares. Over a few years the effect is modest; over decades it is transformative. This is why price-only charts of an index systematically understate what an investor actually earned, and why you should check whether a quoted historical return is a price return or a total return, since the two diverge enormously over long horizons. It also matters for comparing individual stocks: a company yielding 4% and growing its price at 3% delivers roughly the same total return as one paying nothing and growing at 7%, but a price-only comparison makes the second look twice as good. There's a genuine tax consideration on the other side, since dividends are typically taxed as they're received in a taxable account, whereas unrealised price appreciation isn't taxed until you sell, which is a real advantage for growth-oriented holdings in taxable accounts. But the analytical point stands: any return calculation that omits dividends is measuring the wrong thing.
A worked example: two trades that look the same and aren't
Investor A buys 100 shares at $50, holds for eight months, sells at $60, and collects $250 in dividends. Cost $5,000, revenue $6,250, profit $1,250, total return 25%. Annualised, that's roughly 39%, an excellent result. Investor B buys 100 shares of a different company at $50, holds for four years, sells at $60, and collects $250 in dividends across the period. Identical cost, identical revenue, identical $1,250 profit, identical 25% total return. Annualised, that's about 5.7% a year. Over those same four years a broad index fund returning something in the region of 8-10% annually would have turned $5,000 into roughly $6,800-7,300, comfortably ahead. So Investor B's trade, which looks identical on a raw return basis, actually underperformed a passive alternative that required no research and no decisions. This is the single most useful discipline in evaluating your own results: always annualise, and always compare against what you'd have earned doing nothing in an index fund over the same window. A great many portfolios that feel successful in raw percentage terms turn out to have lagged a simple benchmark once both adjustments are made.
Deciding whether a position is actually worth holding
Investors frequently anchor on their purchase price, which leads to two mirror-image errors. The first is refusing to sell a loser until it returns to break-even, as though the purchase price has some significance to the market, which it does not. The second is selling a winner purely because it has risen a certain percentage, locking in a gain while abandoning a business that may still be compounding. The more useful frame ignores the entry price entirely and asks a fresh question: given today's price and what you now know, would you buy this position today with new money? If the answer is no, the purchase price is irrelevant to whether you should continue holding, and holding is simply a decision to buy it again at today's price by default. Where the entry price does legitimately matter is tax: in a taxable account, selling a winner realises a gain and triggers tax, and if you're close to crossing from short-term to long-term capital gains treatment, waiting can be worth a meaningful amount. Selling a loser can also be deliberately useful, since realising the loss may offset gains elsewhere, though wash sale rules restrict repurchasing a substantially identical security within a defined window.
What this calculation leaves out, and why real returns are lower
The clean profit figure omits several real costs. Trading commissions have largely disappeared for retail stock trades at major brokers, but the bid-ask spread has not: you generally buy near the ask and sell near the bid, and on a thinly traded stock that spread can quietly cost a percent or more on a round trip. Tax is the larger omission. In a taxable US account, a gain on a position held a year or less is taxed as a short-term capital gain at ordinary income rates, while a gain on a position held longer than a year qualifies for long-term rates, which are typically significantly lower. That distinction alone can change the after-tax outcome of two otherwise identical trades by a wide margin, and dividends receive their own treatment depending on whether they're qualified. Inflation is the third omission: a 25% nominal gain over four years during which inflation ran 3% annually is roughly a 12% real gain, since prices rose about 12.5% over the same period. And there's survivorship bias in how people evaluate their own records, since losing positions are more easily forgotten than winners. Measuring performance honestly means annualising, benchmarking against an index, and where possible looking at after-tax, after-cost, inflation-adjusted returns rather than the headline percentage.
Variations: annualised return, CAGR, and money-weighted returns
The simple return this calculator produces works cleanly for a single purchase and a single sale. Real portfolios are messier. Annualised return, or compound annual growth rate, converts a total return over any period into an equivalent yearly rate, and is the correct basis for comparing investments of different durations: CAGR equals the ending value divided by the beginning value, raised to the power of one divided by the number of years, minus one. Where you've added or withdrawn money over time, simple return breaks down entirely and you need either a time-weighted return, which strips out the effect of your contribution timing and is what fund managers are measured on, or a money-weighted return (internal rate of return), which includes it and better reflects your personal experience. The two can differ substantially: someone who added heavily just before a downturn will show a much worse money-weighted return than time-weighted, and that gap is itself informative, since it measures the cost of contribution timing. For dividend-reinvested positions, total return including reinvestment is the honest measure rather than tracking price and dividends separately.
Measuring your stock returns honestly
Always include dividends, since they've historically accounted for a large share of long-run equity returns and price-only figures systematically understate what you earned. Annualise any return before comparing it to another, because a 25% gain means something entirely different over six months than over ten years. Benchmark against what a broad index fund would have returned over the identical period, which is the relevant alternative and a more demanding comparison than most portfolios survive. Account for tax by noting whether gains are short or long term, since crossing the one-year mark can meaningfully change the after-tax result. And when deciding whether to hold, ignore your purchase price and ask whether you'd buy the position today at today's price, since the entry price carries no information about future returns.
What people get wrong
- Tracking price change only and omitting dividends, which understates long-run returns substantially since reinvested dividends compound.
- Comparing raw total returns across positions held for different lengths of time instead of annualising first.
- Judging a return in isolation rather than against what a broad index fund would have returned over the same window.
- Anchoring on the purchase price when deciding whether to sell, instead of asking whether you'd buy the position today at the current price.
Where the math comes from
Cost = Buy Price × Shares. Revenue = (Sell Price × Shares) + Dividends. Profit = Revenue - Cost. ROI = (Profit / Cost) × 100. This is a simple total return over the holding period; to compare across different durations, convert to an annualised figure using CAGR = (Revenue / Cost)^(1 / Years) - 1.
Questions and answers
What is a realistic long-term return rate?
US large-cap equities have returned ~10% nominal and ~7% real since 1928. For projections, 6-7% nominal is conservative; 8-9% is the historical average for US-tilted portfolios.
How does inflation affect long-term projections?
Use real returns (return minus inflation) for inflation-adjusted projections. A nominal $1M in 30 years has the purchasing power of about $412K today at 3% inflation.
Should I include dividends?
Yes - total return (price appreciation + dividends reinvested) is the right number. Using only price appreciation undercounts equity returns by ~1.5-2 percentage points annually.
How do fees affect the projection?
A 1% expense ratio compounds to roughly 25% less ending balance over 40 years. Low-cost index funds typically charge 0.03-0.20%; actively managed funds 0.5-1.5%.
What happens during bear markets?
Markets recover - historically every drawdown has eventually been followed by a higher peak. The math of compounding actually rewards consistent buying through downturns.
Should dividends be included in a stock return calculation?
Yes. Over long periods, reinvested dividends have accounted for a very large share of total equity market returns, with studies of the S&P 500 commonly attributing roughly a third to a half of cumulative long-run returns to them depending on the period. A price-only calculation systematically understates what you actually earned, which is also why it's worth checking whether a quoted historical index return is a price return or a total return.
Why should I annualise my return?
Because a raw percentage means nothing without a time period attached. A 25% total return is roughly 56% annualised over six months and only about 2.3% annualised over ten years, and the second has almost certainly lost to inflation. Annualising is the only way to compare investments held for different durations on a like-for-like basis.
How do I know if my return was actually good?
Compare it against what a broad market index fund would have returned over exactly the same period. That's the genuine alternative available to you with no research and no decisions, so it's the relevant benchmark. Many portfolios that look successful in raw percentage terms turn out to have lagged a simple index once annualised and compared over the same window.
Does this calculation include taxes and fees?
No. It shows gross profit before tax, commissions, and the bid-ask spread. In a US taxable account, gains on positions held a year or less are taxed at ordinary income rates while longer holdings qualify for lower long-term capital gains rates, which can substantially change the after-tax outcome of otherwise identical trades. Bid-ask spread also costs real money on a round trip, particularly on thinly traded stocks.
Should I sell a stock once it's up a certain percentage?
Your purchase price carries no information about the stock's future returns, so a fixed percentage rule isn't a sound basis on its own. A more useful test is whether you'd buy the position today at today's price with new money; if not, holding is effectively that purchase by default. Tax is a legitimate exception: in a taxable account, waiting to cross from short-term to long-term capital gains treatment can be worth a meaningful amount.
What if I bought shares at several different prices?
Simple return breaks down with multiple purchases. You'd typically calculate a weighted average cost basis across all purchases, or use an internal rate of return (money-weighted return) that accounts for the timing and size of each contribution. The distinction matters: money-weighted return reflects your personal experience including contribution timing, while time-weighted return strips that out and measures the underlying investment's performance.
Sources & References
Authoritative references consulted in building this calculator and educational content. These are primary sources — check directly for the most current figures.
Related calculators
Wedding Budget · Expense Ratio Impact · Office Space · Present Value · Customer Lifetime Value