Stock Profit Calculator

Enter what you paid, what you sold for and how many shares to see your profit and percentage return.

Loading tool…

  • Free
  • No sign-up
  • Runs in your browser

How to use the stock profit calculator

  1. Enter the buy price and sell price per share.
  2. Enter the number of shares, or switch to the amount you invested.
  3. Add any buy and sell commissions.
  4. Optionally enter a tax rate to see the profit you keep.

The formulas

  • Total cost = shares × buy price + buy commission
  • Sale proceeds = shares × sell price − sell commission
  • Profit or loss = proceeds − total cost
  • Return = profit ÷ total cost × 100
  • Break-even price = (shares × buy price + all commissions) ÷ shares

Example

You buy 50 shares at $40.00 and sell them at $46.50, paying a $5 commission each way.

Total cost50 × $40.00 + $5 = $2,005.00
Sale proceeds50 × $46.50 − $5 = $2,320.00
Profit$315.00
Return15.71%
Break-even price$40.20

Why the break-even price matters

Commissions mean the share price has to rise a little before you make anything. The break-even price is the lowest price at which selling gets all your money back. On small trades, fees can swallow a large share of the gain: a $5 commission each way on a $200 position needs a 5% rise just to break even.

Short-term and long-term capital gains

In many countries the tax on a gain depends on how long you held the shares. In the United States:

Holding periodCalledFederal tax
One year or lessShort-term gainTaxed as ordinary income, 10% to 37%
More than one yearLong-term gain0%, 15% or 20%, depending on income

Other countries have their own rules, allowances and rates. Enter the rate that applies to you in the tax box for an estimate. Losses can often be set against gains to reduce the tax owed.

Averaging several purchases

If you bought the same stock at different prices, use your average cost per share as the buy price:

Average cost = total amount paid ÷ total shares

Buying 10 shares at $50 and 30 shares at $40 gives (500 + 1,200) ÷ 40 = $42.50.

What the calculator leaves out

  • Dividends received while you held the shares. Add them to your profit for the total return.
  • Currency changes, if the stock is priced in a different currency from your account.
  • Inflation. A 5% gain in a year with 4% inflation is a 1% gain in buying power.
  • Time. A 20% return in one year is far better than 20% over five years. Compare investments held for different periods with the compound interest calculator.

Realized and unrealized gains

A gain is unrealized, sometimes called a paper gain, while you still hold the shares. It becomes realized when you sell, and in most places that is the moment tax becomes due. Enter today's market price as the sell price to see your unrealized position.

This calculator gives estimates for planning. It is not financial or tax advice. Prices, fees and tax rules vary, so check the figures with your broker, exchange or a tax professional.

Frequently asked questions

How do I calculate percentage return on a stock?

Divide your profit by your total cost and multiply by 100. A $315 profit on a $2,005 cost is a 15.71% return.

Does it work for fractional shares?

Yes. Enter a decimal number of shares, or switch to the amount invested.

Can I calculate a loss?

Yes. If the sell price is below your break-even price, the result is shown as a loss in red.

Does it include dividends?

No. Add any dividends you received to the profit shown to get your total return.

Related tools