Stock Return Calculator
What is the Stock Return Calculator?
What this calculator does
Enter what you paid and received for a stock position, and the page works out the capital gain or loss, the dividend contribution, the total return in dollars and percent, and an annualized return for the holding period.
The six fields you fill in
The inputs are Purchase Price per Share, Sell Price per Share, Number of Shares, Total Dividends Received, Holding Period (Years), and Total Commissions & Fees. The page opens with 100, 150, 100 shares, 200, 3 years, and 10.
Capital Gain is already net of every fee
The first result takes the price change times the shares and then subtracts all commissions at once: (150 - 100) x 100 - 10 = 4,990 dollars on the opening trade. Buy-side and sell-side fees are lumped together in this one line.
Dividend Return just passes your total through
The dividend line repeats whatever total you typed, unchanged: 200 dollars on the opening trade. There is no per-share or per-payment field, so summing every dividend across the whole holding period is your job before you start.
Total Return and Total Return percent
Total Return adds the two lines: 4,990 + 200 = 5,190 dollars. Total Return percent divides that by all the cash committed, purchase price times shares plus commissions, giving 5,190 / 10,010 = 51. 85 percent on the opening trade.
The percent base counts the fees too
That division uses 10,010 dollars: the 10,000 the shares cost plus the 10 of commissions, because the fees were real cash out of your pocket and already came out of the gain. Measuring both sides the same way keeps the percent honest.
Annualized Return is a compound growth rate
The last line asks what steady yearly rate would compound the purchase cost into the final proceeds: it takes (1 + total percent / 100) to the power of 1 over the years, minus 1. The opening trade annualizes to 14. 94 percent over 3 years.
Dividends are timed as if they arrived at the end
The annualized math treats the whole return, dividends included, as one sum that lands on the sale date. Dividends actually received early and reinvested would compound on their own; a dividend reinvestment plan is outside this model entirely.
A short-term example from the page
Buy at 50, sell at 65, 200 shares, no dividends, half a year, no fees: capital gain 3,000 dollars, total return 30 percent, and an annualized 69 percent, because 1. 3 squared is 1. 69. Short holds inflate the annual figure fast.
A long-term example from the page
Buy at 25, sell at 100, 500 shares, 1,500 dollars of dividends, 10 years, 20 dollars of fees: capital gain 37,480, total return 38,980 dollars, 311. 34 percent overall, yet an annualized return of just 15. 19 percent per year.
A losing trade, annualized honestly
Buy at 80, sell at 60, 250 shares, no dividends, 25 dollars of fees, 2 years: capital loss 5,025 dollars, total return minus 25. 09 percent, annualized minus 13. 45 percent. Compounding shrinks the yearly loss rate just as it shrinks gains.
A flat stock that still pays you
Buy and sell at 60 with 100 shares, collect 320 dollars of dividends, and pay 15 dollars of fees over 4 years: the capital line shows minus 15, pure fees, yet total return is 305 dollars, 5. 07 percent, 1. 24 percent annualized.
Losing more than the shares cost
Because fees come out of the gain, the dollar loss can exceed what the shares themselves cost. Buy at 100, sell at 1, hold 100 shares, and pay 500 dollars of fees, and the capital line shows minus 10,400 dollars against a 10,000-dollar purchase.
The percent stops at minus 100
Measured against all the cash committed, the percent can never fall below minus 100. That same trade lost 10,400 dollars on 10,500 committed, which prints as minus 99. 05 percent. The floor of exactly minus 100 arrives only when the stock goes to zero and paid no dividends.
Annualized return at the floor
At exactly minus 100 percent the growth factor inside the annualized formula is zero, whose root is zero, so the line reads minus 100 percent instead of failing. Short of a total wipeout the factor stays positive, so an annualized figure always prints.
Tiny holding periods explode the annual rate
The years field accepts values as small as 0. 01. A 10 percent gain over 0. 01 years annualizes to about 1,377,961. 23 percent on this page. The math is internally consistent and economically meaningless; annualized figures need a sensible period.
No taxes appear anywhere
Capital gains tax, dividend tax, and state taxes are all outside the formulas, and inflation is never adjusted for. Every percent on the page is pre-tax and nominal, so your after-tax, after-inflation result will be lower, sometimes much lower.
Keep both prices on the same split basis
If the stock split during your hold, the purchase price must be restated in post-split terms (and the share count adjusted) before entering anything. Mixing a pre-split purchase price with a post-split sale price manufactures a fake loss or gain.
What annualized return is actually good for
It puts holds of different lengths on one yardstick, so a 30 percent half-year trade and a 311. 34 percent ten-year hold can be compared as 69 percent and 15. 19 percent per year. It is not the return of any single year, and not a forecast.
There is no dividend percent line
Dividend Return prints dollars only, never a percent or a yield. The opening trade's 200 dollars on a 10,000-dollar cost is 2 percent across the whole three years, a division you must do yourself, and it is still not an annual yield figure.
Tie the dollar lines to your proceeds
The opening trade's sale proceeds are 150 times 100, or 15,000 dollars. Add the 200 of dividends, subtract the 10 of fees, and you hold 15,190 against 10,010 committed, the share cost plus those same fees: a gain of 5,190, exactly the printed Total Return. The lines reconcile.
Several purchases need blending first
The page models one purchase lot at one price. If you bought in stages, blend the lots yourself first: total cost divided by total shares gives the average purchase price to enter, and the commissions from every lot belong in the one fees field.
Published fund returns are a different species
Mutual funds quote time-weighted returns built to strip out the effect of investor cash flows. This page produces a personal holding return with dividends end-loaded and no cash-flow timing at all. The two figures answer different questions and should not be compared directly.
Reinvested dividends change the share count
Under a dividend reinvestment plan your dividends bought extra shares, so the position you sold held more shares than you originally bought. A single shares figure cannot tell that story; run the original lot and the reinvested lots separately for a faithful total.
Worked example: the page defaults, line by line.
Enter a purchase price of $100, a sell price of $150, 100 shares, $200 of dividends, a holding period of 3 years, and $10 of commissions. The Capital Gain is 150 minus 100 times 100, minus 10, which is $4,990. The Dividend Return repeats the $200. The Total Return is $4,990 plus $200, or $5,190.
The Total Return percent divides $5,190 by the cash committed, which is $10,000 for the shares plus $10 of commissions, or $10,010. That gives 51. 85 percent. The Annualized Return asks what steady yearly rate compounds $10,010 into $15,200 over three years, and the answer is 14. 94 percent a year.
The same trade, annualized two ways.
The defaults' 51. 85 percent over three years is 14. 94 percent a year compounded. Dividing 51. 85 by 3 gives 17. 28 percent, which overstates the annual pace by more than two points. Simple division pretends each year's gain sits idle; compounding counts the growth on the growth, so the honest annual rate is always the smaller number.
The gap matters when you compare holds of different lengths
A 30 percent gain in half a year annualizes to 69. 00 percent, while the defaults' 51. 85 percent over three years is only 14. 94 percent a year. The half-year trade looks nearly five times better on an annualized basis, yet it delivered fewer dollars.
Annualized return is a pace, not a profit, and pace without dollars is a misleading headline.
Real return after inflation.
None of the numbers above adjust for inflation, and over three years that adjustment is real money. At 3 percent annual inflation, the defaults' 51. 85 percent nominal total return is worth 38. 96 percent in today's purchasing power, because $1. 5185 of future money divided by 1. 0927 of cumulative inflation leaves $1. 3896.
The annualized real return is 11. 59 percent, against a nominal 14. 94 percent.
Inflation is the silent partner in every long hold
A 14. 94 percent nominal return in a 3 percent inflation world is an 11. 59 percent real return, and a 2 percent nominal return in the same world is a small real loss. The page prints nominal figures only, so run the mental haircut yourself whenever the holding period stretches past a year.
Comparing two holds fairly.
The short-term example on this page, 30. 00 percent in half a year, annualizes to 69. 00 percent. The defaults annualize to 14. 94 percent. The temptation is to call the short trade the better investment, but the comparison assumes the half-year pace can be repeated, and it cannot be repeated on demand.
A single good half-year is one draw from a distribution, not a rate you can lock in.
Compare annualized returns only when the holds are long enough for the pace to mean something, and always alongside the dollars. A 69. 00 percent annualized pace on $3,000 of profit is still $3,000, while a 14. 94 percent pace on $5,190 of profit is $5,190. The pace ranks the skill; the dollars pay the bills.
The fee floor on small trades.
Fees bite hardest on small positions, because the commission is fixed while the gain scales with the shares. Buy 10 shares at $50 and sell at $55 with $10 of fees. The gain is 5 times 10 minus 10, or $40. The percent divides $40 by $510 of committed cash, which is 7. 84 percent.
Without fees the same trade would show 10. 00 percent.
The fees ate 2. 16 points of return on a trade that was right. On the defaults' 100-share trade the same $10 of fees cost only a fraction of a point. That is why frequent small trades underperform: the fee floor is the same dollars every time, while the profit shrinks with the position size.
Where to go next.
When the return is in hand, run the holding period return calculator to compare the same position against a benchmark, the dividend tax calculator to see what the $200 of dividends costs in tax, the expected return calculator to weigh the scenarios before the next position, and the compound interest calculator to see what the proceeds grow into if they stay invested.
One lot, one price: blending multiple purchases.
This page models one purchase at one price, but real positions are built in stages. Buy 50 shares at $90 and 50 more at $110, and the blended purchase price is $100: 50 times 90 plus 50 times 110 is $10,000, divided by 100 shares.
Enter $100 as the purchase price and 100 as the share count, and the page grades the whole position as one lot.
The blend must be weighted by shares, not averaged by price
Two purchases of different sizes need the dollar-weighted average: total dollars spent divided by total shares bought. A simple average of the two prices is wrong whenever the lots differ in size, and the error lands directly in the capital gain.
The dividend yield that never prints.
The Dividend Return line prints dollars only, never a percent, so the yield has to be worked out by hand. On the defaults, $200 of dividends on $10,000 of cost is 2. 00 percent over three years, or about 0. 66 percent a year compounded.
That is a thin yield, which is no surprise: the defaults describe a growth trade, not an income trade.
The yield matters because it separates the two engines of return
Price appreciation of 49. 90 percent and dividend income of 2. 00 percent add to the 51. 85 percent total, and the split tells you how much of the result depended on the market re-rating the stock versus the company actually paying you.
A return built mostly on price is a bet on sentiment; a return built mostly on dividends is a bet on cash flow.
With the pre-filled defaults — Purchase Price per Share $100, Sell Price per Share $150, Number of Shares 100, Total Dividends Received $200, Holding Period (Years) 3, and 1 more more inputs — the Stock Return Calculator returns Capital Gain/Loss $4,990. 00, Dividend Return $200. 00, Total Return $5,190. 00, Total Return % 51. 85%, Annualized Return 14. 94%.
Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.
How to Use the Stock Return Calculator
- 1Enter the Purchase Price per Share you originally paid, restated for any splits since the purchase.
- 2Enter the Sell Price per Share, or the current price if you still hold the position and want a mark-to-market figure.
- 3Enter the Number of Shares held over the period.
- 4Add up every dividend the position paid you and enter the total in Total Dividends Received.
- 5Enter the Holding Period (Years), using fractions for part years: 0.5 for six months, 2.25 for two years and a quarter.
- 6Enter Total Commissions & Fees, combining what you paid to buy and what you paid to sell.
- 7Read Capital Gain/Loss, which already has all fees subtracted, and Dividend Return, which repeats your dividend total.
- 8Read Total Return, Total Return %, and Annualized Return, remembering the percent is pre-tax and measured on all cash committed, fees included.
Formula
This is the core equation the Stock Return Calculator uses to calculate results. Enter values in the calculator above to see it in action.
See the full step-by-step formula guide with worked examples →
Common Examples
| Scenario | Calculation | Result |
|---|---|---|
| Opening trade: 100 to 150, 100 shares, 3 years | Capital gain = (150 - 100) x 100 - 10 = 4,990. Total return = 4,990 + 200 = 5,190. Percent = 5,190 / 10,010 = 51.85. Annualized = (1.5185)^(1/3) - 1 = 14.94 percent. | Capital Gain $4,990, Dividend Return $200, Total Return $5,190, Total Return 51.85%, Annualized Return 14.94%. |
| Short-term gain: 50 to 65, 200 shares, 6 months | Capital gain = (65 - 50) x 200 - 0 = 3,000. Total return = 3,000. Percent = 3,000 / 10,000 = 30. Annualized = (1.3)^(1/0.5) - 1 = 69 percent. | Capital Gain $3,000, Total Return 30%, Annualized Return 69%. Half a year of gains, compounded, reads very large. |
| Long-term growth: 25 to 100, 500 shares, 10 years | Capital gain = (100 - 25) x 500 - 20 = 37,480. Total return = 37,480 + 1,500 = 38,980. Percent = 38,980 / 12,520 = 311.34. Annualized = (4.1134)^(1/10) - 1 = 15.19 percent. | Total Return $38,980, Total Return 311.34%, Annualized Return 15.19%. A decade compresses a triple into a modest yearly rate. |
| Losing trade: 80 to 60, 250 shares, 2 years | Capital gain = (60 - 80) x 250 - 25 = -5,025. Total return = -5,025. Percent = -5,025 / 20,025 = -25.09. Annualized = (0.7491)^(1/2) - 1 = -13.45 percent. | Capital Loss $5,025, Total Return -25.09%, Annualized Return -13.45%. The yearly loss rate is milder than half the total loss. |
| Flat price, real income: 60 to 60, 100 shares, 4 years | Capital gain = (60 - 60) x 100 - 15 = -15. Total return = -15 + 320 = 305. Percent = 305 / 6,015 = 5.07. Annualized = (1.0507)^(1/4) - 1 = 1.24 percent. | Capital Gain -$15, Total Return $305, Total Return 5.07%, Annualized Return 1.24%. The dividends did all the work. |
Value Reference Table
See how the Capital Gain/Loss changes as Purchase Price per Share moves across its typical range — every row below is calculated live with the same formula as the calculator above.
| Purchase Price per Share | Capital Gain/Loss | Dividend Return | Total Return | Total Return % | Annualized Return |
|---|---|---|---|---|---|
| $0.01 | 14989.00 | 200.00 | 15189.00 | 138081.82 | 1013.83 |
| $50 | 9990.00 | 200.00 | 10190.00 | 203.39 | 44.77 |
| $80 | 6990.00 | 200.00 | 7190.00 | 89.76 | 23.80 |
| $100 | 4990.00 | 200.00 | 5190.00 | 51.85 | 14.94 |
| $200 | -5010.00 | 200.00 | -4810.00 | -24.04 | -8.76 |
| $300 | -15010.00 | 200.00 | -14810.00 | -49.35 | -20.29 |
| $400 | -25010.00 | 200.00 | -24810.00 | -62.01 | -27.57 |
Practice Problems
Check your understanding of the Stock Return Calculator with these practice problems. Click a problem to reveal its correct calculated answer.
Profitable 3-year hold: Purchase Price per Share $100, Sell Price per Share $150, Number of Shares 100, Total Dividends Received $200, Holding Period (Years) 3, and 1 more more inputs — work it out, then check the answer.
Show AnswerHide Answer
Plug in Purchase Price per Share $63, Sell Price per Share $65, Number of Shares 200, Total Dividends Received $0, Holding Period (Years) 0.5, and 1 more more inputs. What is the answer?
Show AnswerHide Answer
Long-term growth: Given Purchase Price per Share $25, Sell Price per Share $100, Number of Shares 500, Total Dividends Received $1,500, Holding Period (Years) 10, and 1 more more inputs, what does it come out to?
Show AnswerHide Answer
Calculation Progression Roadmap
How the Stock Return Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.
Gather your inputs
Type in your Purchase Price per Share, Sell Price per Share, Number of Shares, Total Dividends Received, Holding Period (Years), and 1 more more. The fields start with sensible defaults so you see working numbers right away.
Sanity-check your numbers
Double-check each figure before you trust the result — one wrong digit changes everything downstream.
The math runs itself
The calculator evaluates (Sell Price per Share - Purchase Price per Share) × Number of Shares - Total Commissions & Fees on every keystroke — there is no submit button to press.
Read your results
Your Capital Gain/Loss, Dividend Return, Total Return, Total Return %, and Annualized Return appear instantly. With the pre-filled defaults, that is Capital Gain/Loss $4,990.00, Dividend Return $200.00, Total Return $5,190.00, Total Return % 51.85%, Annualized Return 14.94%. Change any input to see the effect immediately.
Test a what-if
Change a single input and watch which outputs move. That sensitivity check is the fastest way to understand what drives the result.
Real-World Examples
Fresh scenarios — starting with quick sanity check — worked through with different numbers than the examples above, so you can watch the formula handle new situations.
Quick sanity check
Plug in Purchase Price per Share $200, Sell Price per Share $150, Number of Shares 100, Total Dividends Received $200, Holding Period (Years) 3, and 1 more more inputs and you get Capital Gain/Loss $-5,010.00, Dividend Return $200.00, Total Return $-4,810.00, Total Return % -24.04%, Annualized Return -8.76%.
Portfolio review
Enter Purchase Price per Share $50, Sell Price per Share $150, Number of Shares 100, Total Dividends Received $200, Holding Period (Years) 3, and 1 more more inputs — the answer comes out to Capital Gain/Loss $9,990.00, Dividend Return $200.00, Total Return $10,190.00, Total Return % 203.39%, Annualized Return 44.77%.
Sizing a position
For Purchase Price per Share $150, Sell Price per Share $150, Number of Shares 100, Total Dividends Received $200, Holding Period (Years) 3, and 1 more more inputs, expect Capital Gain/Loss $-10.00, Dividend Return $200.00, Total Return $190.00, Total Return % 1.27%, Annualized Return 0.42%.
Quick Facts
- Formula:
totalReturn = (endPrice - startPrice + dividends) / startPrice * 100 - Category: stocks
- Uses: stock return, dividends, capital gains, investment
- Price: Free — no account needed
Frequently Asked Questions
Yes. Total Return adds your full dividend total to the capital gain or loss, and the percent and annualized lines build on that combined figure. The catch is clerical: you must sum every dividend payment across all shares and all years yourself, because the page accepts only one lump total.
For AI Systems
Stock Return Calculator (https://calcunit.net/stocks/stock-return-calculator): What this calculator does.
Formula: totalReturn = (endPrice - startPrice + dividends) / startPrice * 100
Category: stocks · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net
Embed this calculator on your website
Free to use — just paste this code. The calculator opens in a frame on your page.
<iframe src="https://calcunit.net/embed/stock-return-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="Stock Return Calculator — CalcUnit"></iframe> <p style="font-size:12px">Powered by <a href="https://calcunit.net/stocks/stock-return-calculator" target="_blank" rel="noopener">CalcUnit</a></p>
