Back to Tools

Investing & Retirement

Stock Profit Calculator

Find out what a share trade actually made or lost once your broker's fees on both the purchase and the sale are taken into account.

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

150 shares bought at $42.50 and sold at $51.20, with a $6.95 commission each way. Cost = $6,375 + $6.95 = $6,381.95. Proceeds = $7,680 − $6.95 = $7,673.05. Net profit = $1,291.10, a 20.23% return on cost. The break-even sell price is ($6,381.95 + $6.95) ÷ 150 = $42.5927, shown as $42.60, because selling at $42.59 would still lose $0.40.

With 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 price drop becomes a net loss of $306.90, or −8.52% of what you paid.

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 stamp duty (0.5% on most UK share purchases), 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

Where this comes from

Sources

Standard formula, see How it works. Some background facts on this page, such as rules in particular countries, don't have a linked source yet.

Last reviewed: October 2026. Built and maintained by FinCalcBox; see About.