How stock profit is calculated
- Total cost = Shares × Buy price + Buying fees
- Sale proceeds = Shares × Sell price − Selling fees
- Profit = Sale proceeds − Total cost
- Return = Profit ÷ Total cost × 100
- Annualized return = (Proceeds ÷ Cost)1 ÷ years − 1
Worked example
You buy 100 shares at 50 and sell them two years later at 65, with no fees. Your cost is 5,000 and the sale brings in 6,500, a profit of 1,500 and a 30% return. Spread over two years, that's an annualized return of 14.02%. After 15% capital gains tax you keep 1,275.
Why annualized return matters
A 30% gain in 2 years is very different from 30% in 10 years. Annualized return (like CAGR) puts trades held for different lengths of time on the same footing, so you can compare them with each other and with an index fund.
Capital gains tax basics (US)
- Short-term gains (held a year or less) are taxed as ordinary income.
- Long-term gains (held more than a year) are taxed at 0%, 15% or 20% depending on income.
- Losses offset gains, and up to $3,000 a year of net losses can offset ordinary income.
These are estimates for planning, not financial advice. Returns are never guaranteed and can be negative.
More investing tools: the retirement calculator, Roth IRA calculator, investment calculator, dividend calculator, CD calculator and stock profit calculator.
Frequently asked questions
How do I calculate profit on a stock?
Multiply the number of shares by the sell price, subtract selling fees, then subtract what you paid in total (shares × buy price plus buying fees).
What is a break-even price?
The sell price at which you'd make neither a profit nor a loss after fees: (total cost + selling fees) ÷ number of shares.
How do I calculate percentage gain on a stock?
Divide your profit by your total cost and multiply by 100. Buying at 50 and selling at 65 is a 30% gain before fees.
Does this work for crypto or ETFs?
Yes. The maths is the same for any asset bought and sold at a price: ETFs, funds, crypto or precious metals. Tax rules may differ.
Last updated November 2026