Stock Return and Capital Gain Calculator

Calculate returns, CAGR, and capital gains tax on stock investments.

Status: Algorithmic Audit (CPA Review Pending)
Jurisdiction: United States (IRS & SSA Standards)
Tax Year / Constants: 2026 Statutory Limits
Data Privacy: 100% Client-Side In-Browser

The Mathematical Formula

Total Return (%) = [ (Ending Price - Starting Price + Dividends) / Starting Price ] × 100% ; CAGR = (Ending Price / Starting Price)^(1/Years) - 1

Variable & Parameter Definitions

  • Total Return (%) The comprehensive holding period percentage gain combining capital appreciation plus dividend distributions.
  • Ending Price Market closing share price at liquidation or end of evaluation period.
  • Starting Price Original purchase price or cost basis per share.
  • Dividends Cumulative cash dividend distributions received per share over the holding period.
  • CAGR Compound Annual Growth Rate: the smoothed annualized geometric rate of return over t years.

Real-World Worked Scenario: 5-Year Equity Holding Return with Reinvested Dividends

An investor buys 100 shares of a blue-chip company at $50 per share ($5,000 cost basis). Five years later, the stock trades at $85 per share and paid $7.50 per share in cumulative dividends.

  1. Capital Gain per Share: $85 - $50 = $35.00 per share.
  2. Total Gain per Share: $35.00 (Price Gain) + $7.50 (Dividends) = $42.50 per share.
  3. Total Cumulative Return: ($42.50 ÷ $50.00) × 100% = 85.0% total gain.
  4. Total Portfolio Proceeds: 100 shares × ($85 + $7.50) = $9,250 ($4,250 total net profit).
  5. Annualized CAGR Calculation: ($85 ÷ $50)^(1/5) - 1 = (1.70)^0.20 - 1 = 11.20% per year (12.85% annualized with dividend reinvestment).
Key Financial Takeaway: Dividends historically account for roughly 30% to 40% of the S&P 500 total return. Never measure equity performance on share price alone.

Strategic Insights & Pitfalls to Avoid

  • ✓ Dividend Reinvestment Plan (DRIP): Automatically reinvesting dividends purchases fractional shares on market pullbacks, compounding share counts.
  • ✓ Tax Drag in Taxable Accounts: Long-term capital gains held for over 1 year receive 0%, 15%, or 20% federal tax rates, while short-term trades are taxed at ordinary income rates.
  • ✓ Inflation Adjustment: Subtract annual CPI inflation to evaluate real wealth accumulation.

Frequently Asked Questions

What is the difference between simple return and CAGR?

Simple return is total percentage gain regardless of time. CAGR normalizes the return into a standardized compound annual rate, enabling fair comparison across different holding periods.

How does tax cost basis affect stock return calculations?

Your tax cost basis includes the purchase price plus broker commissions. When calculating net after-tax return, deduct capital gains tax owed on the spread between sale price and basis.

What is the historical average return of the US stock market?

Over the past 90+ years, the S&P 500 has averaged roughly 10% nominal annual return (or roughly 7% after adjusting for inflation).

Related Decision Calculators

Dividend Tax Calculator Calculate taxes owed on qualified and ordinary dividend income.... Return On Investment (ROI) Calculator Calculate the return on investment (ROI) and annualized rate of r... Holding Period Return Calculator Calculate the holding period return (HPR) of an investment includ... Compound Interest Calculator Forecast savings growth over time with monthly contributions, ann...