Your profit on a stock is the sell price minus the buy price, times the number of shares. Divide that profit by what you paid, and you have your return.
The calculator leaves out fees, dividends and tax. Here's how to add them yourself, and how to judge the percentage.
Which prices go into the calculator?
Enter prices per share, not totals. Your broker's trade confirmations show both prices. Still holding the stock? Enter today's price as the sell price, and you'll see your gain or loss on paper.
- Several purchases. If you bought at different prices, enter your average cost per share. The stock average calculator works it out from each buy.
- A stock split. The IRS spreads your old cost over the new share count. In its example, 100 shares that cost $1,500 in total become 200 shares at $7.50 each. Enter the adjusted price and share count, or let the stock split calculator do it.
Same $1,500 profit, very different trades
The dollar figure shows what landed in your account. The percentage shows how hard each dollar worked. These four trades each made the same profit:
| Trade | Amount invested | Profit / loss | Return |
|---|---|---|---|
| 50 shares: $20 to $50 | $1,000 | $1,500 | 150.0% |
| 10 shares: $400 to $550 | $4,000 | $1,500 | 37.5% |
| 1,000 shares: $20 to $21.50 | $20,000 | $1,500 | 7.5% |
| 300 shares: $100 to $105 | $30,000 | $1,500 | 5.0% |
The first trade turned $1,000 into $2,500. The last one tied up $30,000 for the same money, a 5% return. To compare trades of different sizes, look at the return, not the profit.
Why a 50% loss needs a 100% gain
A fall is measured against the higher starting price. The recovery is measured against the lower price you fell to. So the same dollar move is a bigger percentage on the way back up.
The rise you need to get back to even
Gain needed to climb back to a $100 starting price
After a 50% drop, the stock has to double to get you back to even. A 50% rise isn't enough: $100 falls to $50, climbs to $75, and you're still down 25%.
How to add commissions yourself
The IRS counts commissions and transfer fees as part of what you paid for a stock. On the sale, its form instructions define net proceeds as gross proceeds minus selling expenses such as commissions.
So add the buy fee per share to the buy price. Then take the sell fee per share off the sell price. Here's a $25 stock sold at $27, with a $10 commission on each trade:
| Trade | Amount invested | Profit / loss | Return |
|---|---|---|---|
| 40 shares, no fees | $1,000 | $80 | 8.00% |
| 40 shares, $10 fee each way | $1,010 | $60 | 5.94% |
| 500 shares, no fees | $12,500 | $1,000 | 8.00% |
| 500 shares, $10 fee each way | $12,510 | $980 | 7.83% |
For 40 shares, $10 is 25 cents a share, so you'd enter $25.25 and $26.75. The same $20 in fees costs the small trade about two points of return. The larger trade loses under a fifth of a point.
The price you need to break even
For 40 shares at $25 with $10 each way, that's (1,000 + 20) ÷ 40 = $25.50. Sell below it, and you lose money even though the stock went up.
Short-term or long-term: one day decides
For US federal tax, the IRS sorts gains by how long you held the shares. More than one year is long-term. One year or less is short-term.
You count from the day after you bought, up to and including the day you sold. Bought on March 3, 2025? Selling on March 3, 2026 gives a short-term gain. Sell a day later, and it's long-term.
Short-term gains are taxed as ordinary income, at your regular rates. The tax bracket calculator shows which bracket you're in. Long-term gains are taxed at 0%, 15% or 20%, depending on your taxable income, gain included. For tax year 2026, the IRS limits are:
- Single filers: 0% up to $49,450 of taxable income, 15% up to $545,500, and 20% above that.
- Married filing jointly: 0% up to $98,900, 15% up to $613,700, and 20% above that.
At the 15% rate, a $1,500 long-term gain means $225 of federal tax. The IRS adds that people with significant investment income may also owe the net investment income tax.
When the result is negative
Capital losses offset your capital gains first. If your losses are larger, up to $3,000 of the excess reduces your other income each year. It's $1,500 if you're married filing separately. You carry the rest forward to later years.
Compare returns per year, not per trade
A return without a time period can't be compared with anything. Here's the same 20% gain, $10,000 to $12,000, over different holding periods:
| Held for | Total gain | Per year |
|---|---|---|
| 3 months | 20% | 107.4% |
| 1 year | 20% | 20.0% |
| 2 years | 20% | 9.5% |
| 5 years | 20% | 3.7% |
Taking five years to make 20% works out to 3.7% a year. The three-month figure assumes you'd repeat the trade four times in a row, which rarely happens. The annualized return calculator converts any result from this page.
Dividends and foreign shares take one extra step
The return here is price-only. Dividends paid while you held the stock aren't in it. Add them to the profit, then divide by the amount invested to get your total return.
For shares priced in another currency, convert both prices to dollars at each trade date's rate. Otherwise currency moves hide inside the result.
If your shares became worthless, enter a sell price of zero. The result then shows the whole amount invested as a loss, a −100% return.
Sources
- IRS, Topic no. 409, Capital gains and losses (reviewed September 24, 2026)
- IRS, Revenue Procedure 2025-32: inflation adjustments for tax year 2026
- IRS, Topic no. 703, Basis of assets (reviewed September 24, 2026)
- IRS, Instructions for Form 8949 (2025)
- IRS, FAQs: Stocks (options, splits, traders) (reviewed August 26, 2026)