Stock Return Calculator Formula
Understand the math behind the stock return calculator. Each variable explained with a worked example.
Formulas Used
Total Return
total_return_pct = cost_basis > 0 ? (capital_gain + dividends_received) / cost_basis * 100 : 0Annualized Return
annualized_return = cost_basis > 0 ? (pow((current_value + dividends_received) / cost_basis, 1 / years_held) - 1) * 100 : 0Total Profit
total_profit = capital_gain + dividends_receivedCapital Gain
capital_gain_amount = capital_gainVariables
| Variable | Description | Default |
|---|---|---|
purchase_price | Purchase Price per Share(USD) | 50 |
current_price | Current Price per Share(USD) | 75 |
shares | Number of Shares | 100 |
dividends_received | Total Dividends Received(USD) | 500 |
years_held | Years Held(years) | 3 |
cost_basis | Derived value= purchase_price * shares | calculated |
current_value | Derived value= current_price * shares | calculated |
capital_gain | Derived value= current_value - cost_basis | calculated |
How It Works
Stock Return Calculation
Total Return
Total Return = (Capital Gain + Dividends) / Cost Basis x 100%
Annualized Return (CAGR)
Annualized Return = [(Ending Value + Dividends) / Cost Basis]^(1/Years) - 1
The annualized return normalizes your return to a per-year basis, making it easy to compare investments held for different periods.
Why Include Dividends
Dividends often account for 30-40% of total stock market returns over long periods. Ignoring them understates your actual investment performance.
Worked Example
Bought 100 shares at $50, now worth $75 each, received $500 in dividends over 3 years.
- 01Cost basis = 100 x $50 = $5,000
- 02Current value = 100 x $75 = $7,500
- 03Capital gain = $7,500 - $5,000 = $2,500
- 04Total return = ($2,500 + $500) / $5,000 = 60%
- 05Annualized = ($8,000 / $5,000)^(1/3) - 1 = 16.96%
Frequently Asked Questions
What is the difference between total return and price return?
Price return only measures the change in share price. Total return includes dividends and other distributions. Total return gives a more complete picture of investment performance.
How do I calculate return on multiple purchases?
For multiple purchases at different prices, use the total cost basis (sum of all purchase amounts) and total current value. For precise tracking, consider using a dollar-weighted return method.
What is a good annualized stock return?
The S&P 500 has historically returned about 10% annually (7% after inflation). Individual stock returns vary widely. Returns above 15% annualized are considered excellent over multi-year periods.
Learn More
Guide
How to Calculate ROI (Return on Investment)
Learn how to calculate ROI for investments, business projects, and real estate. Covers the basic ROI formula, annualized returns, CAGR, and common pitfalls in ROI analysis.
Ready to run the numbers?
Open Stock Return Calculator