Stock Profit Calculator

Calculate the profit or loss on a stock trade. Enter the purchase price, selling price, number of shares and commissions to see the gross result, the net result after costs and your return on investment.

Enter your numbers

Results update as you type. Example values are pre-filled so you can see how it works.

Your result

Your result will appear here.

Educational estimate only. Not financial, tax or investment advice.

How to use the stock profit calculator

  1. Enter the price you paid per share and the price you sold (or plan to sell) at.
  2. Enter the number of shares.
  3. Enter the commission charged on the purchase and on the sale, plus any other costs such as exchange or regulatory fees.
  4. The results show the gross profit or loss, the net result after costs and the net return on what you invested.

The formula

Gross profit = (sell price − buy price) × shares
Net profit = gross profit − buy commission − sell commission − other costs
Return on investment = net profit ÷ (buy price × shares + buy commission)

Worked example

You buy 100 shares at $50 and sell them at $60, paying $5 commission each way:

  • Gross profit: (60 − 50) × 100 = $1,000
  • Commissions: $10
  • Net profit: $990
  • Amount invested including the buy commission: $5,005
  • Net return: 990 ÷ 5,005 ≈ 19.78%

If the shares had been sold at $40 instead, the gross loss would be $1,000 and the net loss $1,010.

Gross vs. net results

The gross figure shows how the share price moved for your position. The net figure is what you actually keep after trading costs. On small or frequent trades, costs can take a large share of the gross profit, so the net figure is the one to use when judging a trade.

What is not included

  • Taxes. Capital gains tax rules depend on where you live and how long you held the shares. This calculator does not give tax advice.
  • Dividends received while you held the shares. Add them to the result yourself for a total-return view, or estimate future income with the Dividend Calculator.
  • Currency conversion costs when buying shares listed in another currency.

Frequently asked questions

I bought at several prices. Which buy price should I use?

Use your weighted average cost per share. The Stock Average Calculator works it out from each purchase.

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

Because of commissions, it is slightly above your purchase price. The Break Even Price Calculator finds it exactly.

How do I compare trades of different sizes?

Use the percentage return rather than the money figure. For holdings kept over several years, the CAGR Calculator converts the result into an annual rate.

Measure a simple price change with the Percentage Gain Calculator, or browse all stock calculators. For more guides on investing in shares, visit stocks betterthisworld.