Equity investing

Stock Calculator

Enter your buy price, sell price and number of shares to see the profit or loss and the return.

  • Free
  • No sign-up

Trade details

$
$

Enter the buy price, sell price and shares to see the result.

Worked example

With these example inputs:

  • Buy price$50
  • Sell price$65
  • Number of shares100

Profit / loss: $1,500

  • Return30.0%
  • Amount invested$5,000

Add this calculator to your site

Free to embed. Copy the snippet below, it drops the live calculator straight into any page.

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.

profit or loss = (sell price − buy price) × shares return = (sell price − buy price) ÷ buy price × 100 amount invested = buy price × shares

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:

TradeAmount investedProfit / lossReturn
50 shares: $20 to $50$1,000$1,500150.0%
10 shares: $400 to $550$4,000$1,50037.5%
1,000 shares: $20 to $21.50$20,000$1,5007.5%
300 shares: $100 to $105$30,000$1,5005.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

Down 10%, to $90 11.1%

Down 25%, to $75 33.3%

Down 50%, to $50 100.0%

Down 80%, to $20 400.0%

The deeper the fall, the faster the required gain grows: an 80% loss needs a 400% rise.

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:

TradeAmount investedProfit / lossReturn
40 shares, no fees$1,000$808.00%
40 shares, $10 fee each way$1,010$605.94%
500 shares, no fees$12,500$1,0008.00%
500 shares, $10 fee each way$12,510$9807.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

break-even sell price = (buy price × shares + all fees) ÷ shares

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 forTotal gainPer year
3 months20%107.4%
1 year20%20.0%
2 years20%9.5%
5 years20%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

Frequently asked questions

How is stock profit calculated?

Subtract the buy price from the sell price and multiply by the number of shares. Buying 100 shares at $50 and selling at $65 gives a $1,500 profit, a 30% return.

Does the result include fees or taxes?

No. Add the buy commission per share to the buy price, and subtract the sell commission from the sell price. Tax is never deducted.