Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Stock profit calculator

Enter what you paid and what you sold for (or might sell for). See the profit after fees, the return on your money, the break-even price, and the annualized return if you add dates.

Private: calculated on your device. Nothing you type is sent anywhere.

Estimates for planning, not financial, tax or legal advice. Figures use US rules unless the page says otherwise.

Next: Work out the exact tax on the gain with the capital gains tax calculator, or compare growth rates with the CAGR calculator.

How it's calculated

Cost = shares × buy price + buy fees    Proceeds = shares × sell price − sell fees
Profit = proceeds − cost    Return = profit ÷ cost × 100

Commissions and fees on the purchase are part of your cost (the IRS includes them in your basis), and fees on the sale reduce what you receive. With buy and sell dates, the annualized return spreads the gain over the time you held the stock:

Annualized return = (proceeds ÷ cost)1 ÷ years held − 1

The break-even sell price is (cost + sell fees) ÷ shares: the price where proceeds exactly equal what you paid.

Worked example

You buy 100 shares at $50 with a $5 commission and sell at $65 with another $5. Cost = 100 × $50 + $5 = $5,005. Proceeds = 100 × $65 − $5 = $6,495. Profit = $1,490, a 29.77% return. Bought March 1, 2024 and sold March 2, 2026 (731 days), that's 13.90% a year. Because you held it more than a year, it's a long-term gain; at a 15% rate the estimated tax is $223.50.

Sell the same shares after six months instead (January 15 to July 15, 2026) and the gain is short-term. At a 22% bracket the tax is $327.80, leaving $1,162.20.

Short-term or long-term?

Shares held more than one year give a long-term gain, taxed at 0%, 15% or 20% depending on your taxable income. Held one year or less, the gain is short-term and taxed at your ordinary income tax rate. This calculator applies one rate you choose to the whole gain. To work out which rate applies to you, with the brackets, use the capital gains tax calculator.

Limitations

  • One purchase and one sale. For several lots bought at different prices, work out each lot separately (your broker's cost basis report shows them).
  • Dividends received aren't included. Add them with the dividend calculator, or use the ROI calculator for a total return.
  • The tax estimate is federal only and ignores the 3.8% net investment income tax, state tax, wash sales and losses from other trades.
  • Annualizing a short holding period can give huge, misleading percentages.

Sources

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • 100 shares $50 → $65 with $5 fees each way: $1,490 profit, 29.77% ✓
  • Held March 1, 2024 to March 2, 2026: long-term, 15% tax = $223.50 ✓
  • Annualized return over 731 days: 13.9% a year ✓
  • Held 6 months, 22% short-term rate: tax $327.80 ✓
  • 50 shares bought at $120, sold at $90: −$1,500.00 loss ✓
  • Edge case: sold exactly 1 year later is still short-term ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

How do I calculate profit on a stock?

Subtract what you paid, including the buy commission, from what you received after the sell commission. 100 shares bought at $50 and sold at $65 with $5 fees each way: $6,495 − $5,005 = $1,490.

How do I calculate the percentage gain on a stock?

Divide the profit by your total cost and multiply by 100. $1,490 ÷ $5,005 × 100 = 29.77%.

Do I pay tax on stock profits?

Yes, when you sell at a gain in a taxable account. Held over a year, the gain is long-term (0%, 15% or 20%); held a year or less, it's taxed like ordinary income.

What price do I need to sell at to break even?

Add your total cost and the sell commission, then divide by the number of shares. ($5,005 + $5) ÷ 100 = $50.10 a share.

What is an annualized return?

The steady yearly return that would turn your cost into your proceeds over the time you held the stock. It lets you compare a 2-year gain with a 6-month one.

Related calculators