Stock Profit & ROI Calculator

Calculate your total return, capital gain, dividend income, and annualized ROI. See exactly where your profit came from with a waterfall chart.

📊 Waterfall Chart Capital + Dividends 🔗 Shareable 💾 Auto-Saves

Ready to Calculate

Enter your buy price, sell price and share count in the left panel to calculate your return in the left settings panel and click calculate to view charts.

How to Use This Stock Profit / ROI Calculator

Calculate exactly how much you made (or lost) on a stock trade in four steps. The calculator combines capital appreciation and dividend income, then applies taxes to give you a true net return number:

  1. Enter Buy & Sell Prices: Type the price you paid per share and the price you sold (or plan to sell) at. Use the slider to scan gain/loss scenarios from -50% to a 2× double.
  2. Set Number of Shares: How many shares did you buy? Multiplied against the buy/sell prices, this gives you the position size.
  3. Add Dividend Income: If the stock pays dividends, enter the annual dividend per share. Enter $0 for growth-only stocks like most tech names.
  4. Set Holding Period & Taxes: How long you held determines the tax rate (long-term vs short-term). Expand Advanced Options to add commission fees.

Capital Gain vs. Dividend Income

A stock's total return has two components. Capital gain is the price appreciation: if you bought at $100 and sold at $150, that's a $50 capital gain per share. Dividend income is cash the company pays you (usually quarterly) just for holding the stock, regardless of price changes.

A dividend stock like Coca-Cola might return 3%/yr in dividends plus 4%/yr in price appreciation = 7% total return. A growth stock like Tesla historically returned 0% in dividends but 25%+/yr in price appreciation. The calculator combines both so you can compare apples to apples.

Stock Profit Formulas

The engine separates gross profit into capital gain and dividend income, then applies the relevant tax to each:

Net Profit = (Capital Gain - Cap Gains Tax) + (Dividends - Div Tax) - Commissions
ROI % = (Net Profit / Cost Basis) × 100
Annualized ROI = (1 + ROI/100)1/t - 1

Formula Variable Guide

Cost BasisBuy price × shares + commissions (what you paid in total)
Capital GainSell price × shares - cost basis (price appreciation only)
DividendsAnnual dividend per share × shares × holding years
TaxLong-term cap gains 15-20% (US), qualified divs 15%, short-term = ordinary income rate
tHolding period in years (affects tax bracket AND annualized ROI)
ROINet profit as a percentage of your cost basis

Long-Term vs. Short-Term Capital Gains

How long you hold a stock dramatically changes your tax bill. In the US, the IRS distinguishes between:

Holding Period Tax Classification Typical US Rate Example on $10,000 Gain
Less than 1 year Short-term capital gain 10-37% (ordinary income) Up to $3,700 tax
1 year or more Long-term capital gain 0%, 15%, or 20% $0 - $2,000 tax

This is why the IRS rewards long-term investing. Holding a winning stock for over a year can cut your tax bill in half or more. The calculator defaults to 15% (the most common long-term rate for middle-income US taxpayers).

Tax-Loss Harvesting Tip
If your position is showing a loss, you can sell and offset up to $3,000/yr of it against your ordinary income (US). Excess losses carry forward indefinitely. Just be careful of the <30-day wash-sale rule: Be careful of the wash-sale rule: if you buy the same or a substantially identical security within 30 days BEFORE or AFTER the sale (a 61-day window), the IRS disallows the loss (IRS Publication 550) or the IRS disallows the loss.

Stock Profit: Strategy & Benchmarks

Compare long-term vs. short-term capital gains tax structures, total return decompositions, and holding periods.

Long-Term vs. Short-Term Capital Gains: The Full Tax Impact Table

Here's what the US federal capital gains tax structure looks like in 2026, so you can enter the correct rate:

Holding Period Tax Type 2026 Federal Rate (by income) Impact on $10,000 Gain
Under 12 months Short-term (ordinary income) 10–37% $1,000–$3,700 tax owed
12+ months (single, under $49,450) Long-term 0% $0 tax owed
12+ months (single, $47k–$518k) Long-term 15% $1,500 tax owed
12+ months (single, over $518k) Long-term 20% $2,000 tax owed
12+ months (high earners) Long-term + NIIT 23.8% $2,380 tax owed

*NIIT = Net Investment Income Tax (3.8%). State capital gains taxes are additional.

💡
Capital Gains Threshold Tip
The difference between selling at month 11 versus month 13 on a $50,000 gain in the 22% income bracket is $5,500 in extra federal tax. Holding an additional 60 days to qualify for long-term treatment produces a guaranteed 11% return on tax savings before any market movement.

Total Return Decomposition: What Makes Up Your Actual Profit

Stock returns have more components than most investors track. This table shows how to think about the full picture for a dividend-paying stock held 3 years:

Return Component Example (Buy $10k, sell at +50%, 3 yrs) Taxed As
Capital gain (price appreciation) $5,000 Long-term CGT (if held 12+ months)
Dividend income (cash received) $2,250 ($750/yr × 3) Qualified dividend rate (0–20%)
Dividend reinvestment gain Additional shares × appreciation Long-term CGT on those shares
Commission costs −$10–$20 (most brokers now $0) Reduces cost basis
Bid-ask spread (entry + exit) −0.01–0.1% on liquid stocks Implicit cost, not tracked
Gross profit $7,250 Mixed tax treatment
Federal tax (15% LTCG + 15% div) ~$1,088
Net profit ~$6,162
Net ROI ~61.6% over 3 yrs / ~17.4% annualized

*The dividend component ($2,250 in this example) is often underestimated. Over 3 years it adds 22.5% to the capital gain.

Annualised ROI: Why the Holding Period Changes Everything

A 100% return sounds identical whether it took 2 years or 10 years. The annualised figure exposes the difference:

Total ROI Holding Period Annualised ROI Equivalent Annual Rate
100% 2 years 41.4% Outstanding
100% 5 years 14.9% Very good
100% 10 years 7.2% Matches S&P 500 average
100% 15 years 4.7% Well below S&P 500 average; barely above inflation
50% 3 years 14.5% Strong
50% 7 years 6.1% Mediocre
20% 1 year 20.0% Excellent
20% 5 years 3.7% Below HYSA

*Formula: Annualised ROI = (1 + Total ROI/100)^(1/years) − 1. Holding period is critical for serious ROI comparisons.

Commission and Fee Impact: The Hidden Return Killer

Modern zero-commission brokers have eliminated explicit trading fees — but other costs still erode returns:

Cost Type Typical Amount Impact on $10,000 Trade Annualised Impact
Broker commission $0 $0 0%
Bid-ask spread (large-cap) 0.01–0.05% $1–$5 0.01–0.05%
Bid-ask spread (small-cap) 0.1–0.5% $10–$50 0.1–0.5%
Bid-ask spread (illiquid stocks) 0.5–3%+ $50–$300+ 0.5–3%+
Options premium (if using) 0.5–2% of position $50–$200 0.5–2%
Short-term gains tax (22% bracket) $220 per $1k gain −22% on profits
Fund expense ratio (if ETF) 0.03–0.75% $3–$75/yr 0.03–0.75%
Tax Rate Differential Warning
The most significant hidden cost for retail investors is the tax differential between short-term and long-term gains. For most investors in the 22–24% bracket, converting a short-term position to long-term by holding one additional year reduces the tax rate on profits from 22–24% to 15% — a 7–9 percentage point improvement.

Frequently Asked Questions

Stock profit (net) = (sale proceeds - cost basis - capital gains tax) + (dividends - dividend tax). Cost basis is what you paid (buy price × shares + commissions). Sale proceeds is what you received (sell price × shares - commissions). Dividends are taxed separately as either qualified (0%/15%/20% US (income-dependent)) or ordinary income.
The S&P 500's historical average annual return (with dividends reinvested) is around 10%. So a 7-10% annualized ROI is a solid long-term stock portfolio return. Anything above 15% annually is excellent. Below 5% means you're underperforming the market, though individual years can swing wildly (-40% to +30%).
No. You only pay capital gains tax when you sell the stock (realize the gain). If your position is up $5,000 on paper, you owe $0 in taxes until you actually sell. The calculator shows your net return on a sold position, so it assumes the gain is realized.
Yes. Qualified dividends (most US stock dividends when held 60+ days) are taxed at the lower long-term capital gains rate (0%, 15%, or 20%). Non-qualified dividends (REITs, MLPs, money market funds) are taxed at your ordinary income rate (10-37%). The calculator lets you set each rate independently in Advanced Options.
Total ROI is the simple percentage gain over the entire holding period. Annualized ROI (CAGR) converts that to an average yearly rate, accounting for compounding. A 50% gain over 5 years is 50% total ROI but only ~8.4% annualized. Annualized ROI is better for comparing investments held for different durations.
Stock splits don't affect your total return — they just multiply your share count while dividing the per-share price by the same factor. A 2:1 split on 100 shares at $200 becomes 200 shares at $100. Your cost basis and value are unchanged, so the calculator's inputs work the same way. Just enter the current price and current share count.

Related Financial Calculators

Investment Growth

Map dynamic growth comparisons between basic yields and interest reinvestment.

Open Calculator →

Rule of 72

See how fast your investment capital will double at any given return rate.

Open Calculator →

Compound Interest

Project long-term portfolio growth with regular contributions and varying compounding.

Open Calculator →