numfolio

Stock profit calculator

Net profit = shares × sell price − sell fee − (shares × buy price + buy fee) − tax. Buying 100 shares at 50 and selling at 65 with fees of 5 each leaves a net profit of 1,490 before tax.

Last updated:

Calculate

Only the unit of the amounts; no currency conversion is made.
Total commission paid on the purchase. Optional.
Total commission paid on the sale. Optional.
%
Applied only to a profit; a loss is not taxed. Optional. Your actual tax depends on your country and situation.
Net profit/loss $1,490.00

Net profit $1,490.00

Where the sale proceeds go
  • Total cost (including buy fee)$5,005.0077.1%
  • Net profit/loss$1,490.0022.9%
Net sale proceeds (after sell fee)
$6,495.00
Profit/loss before tax
$1,490.00
Tax (0%)
$0.00
Return on cost
29.77%
Break-even sell price
$50.10

The tax rate is a simple percentage of the profit; withholding, allowances and loss offsetting rules differ by country and are not modelled. This is not tax advice.

How profit on a stock trade is calculated

The profit on a trade is what you received from the sale minus everything the position cost you. Two things are easy to forget: the fee you paid when buying is part of the cost, and the fee you pay when selling reduces what you actually receive. A trade that looks profitable on the price alone can turn into a loss once both fees are counted, especially when the amounts are small.

Total cost = shares × buy price + buy fee
Net proceeds = shares × sell price − sell fee
Profit before tax = net proceeds − total cost
Net profit = profit before tax − tax (only if there is a gain)

The return on cost is the net profit divided by the total cost. The break-even sell price is the price at which the trade covers its cost and both fees exactly: (shares × buy price + buy fee + sell fee) ÷ shares. Choose the currency of your amounts in the calculator; it only sets the unit and converts nothing.

Worked example

You buy 100 shares at 50 with a fee of 5 and later sell them at 65 with another fee of 5:

  • Total cost: 100 × 50 + 5 = 5,005
  • Net proceeds: 100 × 65 − 5 = 6,495
  • Profit before tax: 6,495 − 5,005 = 1,490, a return on cost of 29.77%
  • Break-even sell price: (5,000 + 5 + 5) ÷ 100 = 50.10

If a tax of 15% applies to the gain, the tax is 223.50 and the net profit 1,266.50, a return of 25.30%. If instead you sell at 45, the net proceeds are 4,495 and the result is a loss of −510, or −10.19% of the cost. No tax is calculated on a loss.

Fees and the break-even price

The break-even price shows how far the price must rise just to get your money back. With a flat fee, the effect shrinks as the trade gets larger: two fees of 5 add only 0.10 per share to a 100-share trade at 50, but 1.00 per share to a 10-share trade. If your broker charges a percentage instead of a flat amount, work out the fee in money for the trade and enter that amount.

Several purchases

If you bought the position in several steps at different prices, the buy price to use is your average cost per share. The stock average calculator works it out from every buy and sell, and the average down calculator shows what a further purchase would do to it. For a holding that also paid dividends, the ROI calculator adds that income to the result.

About the tax field

The tax rate is applied as a simple percentage of the profit. Real tax rules are more detailed: some countries tax short-term and long-term gains differently, allow yearly allowances, let you offset losses against gains or withhold tax at the broker. In the United States, IRS Publication 550 explains how gains and losses from selling investments are reported. Use the tax field for a rough estimate only and check your own situation with your broker's statements or a tax adviser.

What the result does not include

  • Currency conversion: if you bought in a foreign currency, exchange-rate changes between buying and selling are not part of the calculation.
  • Dividends received while you held the shares.
  • Inflation, so the profit is nominal.
  • This page does not recommend buying or selling any security and is not investment or tax advice.

Frequently asked questions

How do I calculate profit on a stock?

Subtract the total cost (shares × buy price + buy fee) from the net proceeds of the sale (shares × sell price − sell fee). If there is a gain, deduct the tax; what remains is your net profit.

What is the break-even sell price?

The price at which you neither gain nor lose after both fees: (shares × buy price + buy fee + sell fee) ÷ shares.

How much do fees matter?

Fees raise the cost when you buy and reduce the proceeds when you sell. On small, frequent trades their effect on the return becomes large.

Is tax charged on a loss?

No. The calculator applies tax to a profit only. Rules for offsetting losses differ by country and are not modelled.

What if I bought at several prices?

Work out your average cost first with the stock average calculator, then enter that average as the buy price.

The information and calculations on this page are for general information only and are not investment or tax advice. For sources and methods, see Methodology and sources.