Back to Tools

Investing & Retirement

Stock Profit Calculator

Find the gain or loss on a share trade after fees, your return on cost and the break-even sell price, with broker fees on both the purchase and the sale counted once.

Your results will appear here

Enter the buy and sell prices and the number of shares, plus any fees. The profit or loss updates as you type.

The method

How it works

Your profit on a share trade is what you got from the sale, minus what the shares cost you. Fees sit on both sides. The commission on the purchase is part of what the shares cost, and the commission on the sale comes out of what you receive. The calculator adds the buy fee to your cost, takes the sell fee off your proceeds and compares the two, so each fee is counted exactly once.

It works the same for shares and ETFs on any exchange, and for fractional shares. The return is your net profit as a percentage of everything you paid, including the buy fee, which is how much the trade actually made on the money you put in.

The break-even sell price is the price per share at which the sale exactly covers your cost plus the fee on the sale. With a flat sell fee, that's (cost + sell fee) รท shares. With a percentage fee, it's cost รท (shares ร— (1 โˆ’ fee %)), because the fee grows with the sale price. The result is rounded up to the next cent (or 0.0001 for shares under $1), so the price shown never still loses money.

The formulas

Cost = buy price ร— shares + buy fee

Proceeds = sell price ร— shares โˆ’ sell fee

Net profit = proceeds โˆ’ cost

Return = net profit รท cost ร— 100

Break-even sell price

Flat fee: (cost + sell fee) รท shares

% fee: cost รท (shares ร— (1 โˆ’ fee %))

Worked example: flat commission

150 shares bought at $42.50 and sold at $51.20, with a $6.95 commission each way. Cost = $6,375.00 + $6.95 = $6,381.95. Proceeds = $7,680.00 โˆ’ $6.95 = $7,673.05. Net profit = $1,291.10, a 20.23% return on cost. The break-even sell price is $42.60; selling at $42.59 would still lose $0.40.

Worked example: percentage fees

20 shares bought at $180 and sold at $165, with a 0.1% fee on each trade. The fees are $3.60 on the purchase and $3.30 on the sale, so a $300.00 price drop becomes a net loss of $306.90, or -8.52% of what you paid.

How fees eat a small gain

10 shares bought at $20 with a $4.95 commission each way. You need to sell at $20.99 just to break even, so a $1 rise leaves almost nothing.

Gross and net profit on 10 shares bought at $20, with $4.95 commission each way
Sell atBefore feesAfter feesReturn
$20.50$5.00-$4.90-2.39%
$21.00$10.00$0.100.05%
$22.00$20.00$10.104.93%
$25.00$50.00$40.1019.57%

Stock profit, trade P&L or ROI? This page is for buying shares and selling them later. For short trades, crypto or leverage, use the Trade P&L Calculator. For any investment with extra costs and a yearly rate, the ROI Calculator adds an annualized return, and the Dividend Yield Calculator shows what a share pays you while you hold it.

What you get

Key features

  • Each fee counted once

    The buy fee is added to your cost and the sell fee comes off your proceeds, so nothing is double-charged.

  • Flat or percentage fees

    Enter commissions as a fixed amount per trade or as a percentage of each trade's value.

  • Before and after fees

    See the price gain on its own and your profit after fees, so you can tell how much trading costs you.

  • Break-even sell price

    See the lowest price you'd need to sell at to cover the purchase and both fees, rounded up so it never shows a price that still loses money.

Read before relying on it

Assumptions

  • It's one purchase and one sale of the same number of shares. If you bought in several lots at different prices, use the average price per share, including the fees you paid.
  • The buy fee is added to your cost and the sell fee is deducted from your proceeds. With percentage fees, each is a percentage of that trade's value.
  • Other costs aren't included unless you add them to the fee fields. That covers UK stamp duty (0.5% when you buy shares electronically), currency conversion charges for foreign shares, and regulatory fees on sales.
  • Dividends you received while holding the shares aren't included. Add them to your profit for a total return.
  • The return is measured against your total cost, including the buy fee, and isn't annualized, so it doesn't reflect how long you held the shares.
  • Results are before tax.

Your broker's contract notes are the final record of what you paid and received.

Questions

Frequently asked questions