Stock Profit Calculator

Work out the real profit or loss on a share trade after brokerage and fees, with the percentage return, the annualised return and your break-even sell price.

How to use this calculator

  1. 1Enter the number of shares and the prices you bought and sold at.
  2. 2Add the brokerage and charges you actually paid on each leg — these are what separate the headline gain from the money that reached you.
  3. 3Include any dividends collected while you held, and your capital gains rate if you want the after-tax figure.
  4. 4Check the break-even sell price: below it the trade lost money however green the price looked.

How the calculation works

Net profit = (shares × sell price − selling cost + dividends) − (shares × buy price + buying cost) − tax
shares × sell price
Gross proceeds before any charge is deducted
selling cost
Brokerage and exchange charges on the sale
buying cost
Brokerage and charges paid when the position was opened
tax
Capital gains tax, applied to the gain only and only when there is one

Both legs of a trade carry costs, and the buying cost is part of what the position cost you — not a separate expense. Adding it to the invested figure rather than subtracting it from the profit is what makes the percentage return correct.

The break-even sell price solves the same equation for the price at which net profit is zero: (invested + selling cost − dividends) ÷ shares. It is the number that tells you whether a position that looks slightly green actually is.

The annualised return uses (1 + return)^(365 ÷ days) − 1, compounding rather than simply scaling. It is only shown for holdings of a month or more, because annualising a few days produces a figure that describes nothing repeatable.

Worked example

100 shares bought at 50, sold at 65

  1. 1.Invested: 100 × 50 = 5,000. Proceeds: 100 × 65 = 6,500.
  2. 2.Net profit = 6,500 − 5,000 = 1,500.
  3. 3.Return = 1,500 ÷ 5,000 = 30%, and because the holding was exactly a year the annualised figure is also 30%.

Result: 1,500 profit, a 30% return

The same trade with costs and tax

  1. 1.Invested = 5,000 + 20 buying cost = 5,020. Net proceeds = 6,500 − 20 = 6,480.
  2. 2.Adding 60 of dividends: profit before tax = 6,480 + 60 − 5,020 = 1,520.
  3. 3.Tax at 15% on 1,520 = 228, so net profit = 1,292 — a 25.7% return rather than the 30% the price move suggested.
  4. 4.Break-even sell price = (5,020 + 20 − 60) ÷ 100 = 49.80 per share.

Result: 1,292 net — costs and tax removed a fifth of the gain

The gap between the price move and what you keep

A share bought at 50 and sold at 65 has risen 30%, and that is the number most people remember. It is also not the return. Between the two prices sit brokerage on both legs, exchange and regulatory charges, any applicable transaction tax, the bid-ask spread absorbed on entry and exit, and finally capital gains tax on whatever is left.

On a large, long-held position these costs are a rounding error. On a small or frequently traded one they are decisive: a fixed brokerage charge of twenty on a five-thousand position is 0.4% of capital consumed twice, before the trade has done anything. That is why the same strategy can look profitable on paper and lose money in practice, and why costs deserve to be entered explicitly rather than assumed away.

Why the break-even price matters more than it sounds

The break-even sell price is the price at which a position returns exactly what it cost — nothing gained, nothing lost. It sits above the purchase price by the amount of both legs' costs, and below it by any dividends collected.

Its practical use is that it converts a vague sense of "I'm about even" into a specific number. A position bought at 50 with twenty of costs each way does not break even at 50; it breaks even at 50.40. Anyone selling at 50.20 in the belief they escaped flat has in fact taken a loss. Knowing the figure in advance also makes stop-loss and target placement honest, because both can then be set relative to what the position actually needs to achieve rather than to the entry price alone.

Annualising a return, and when not to

Two trades returning 10% are not comparable if one took three weeks and the other took three years. Annualising puts them on the same footing by asking what yearly rate, compounded, would produce that result over that period.

The formula compounds rather than scales: a 10% gain in six months annualises to 21%, not 20%, because the gain would itself have earned in the second half. That distinction grows quickly with shorter periods, which is also where the measure becomes misleading. A 5% gain held for four days annualises to something above 4,000% — arithmetically correct and completely meaningless as an expectation. Annualised figures earn their keep comparing holdings of months and years; below roughly a month they should be treated as an artefact rather than a result, which is why this calculator withholds them there.

What this calculation deliberately leaves out

Two real effects sit outside a single-trade calculation and are worth naming so their absence is not mistaken for irrelevance.

  • Opportunity costcapital tied up in one position was not available for another. A 12% return over two years is worse than leaving the money in an index fund that returned 20% over the same period, and no single-trade figure will reveal that.
  • Inflationevery figure here is nominal. A 6% gain in a year when prices rose 5% is a 1% real gain, and a nominal profit during high inflation can still be a loss in purchasing power.
  • The trades you did not makea profitable trade viewed alone tells you nothing about the strategy that produced it. Judging an approach requires the losers alongside the winners, which is what a full portfolio return — not a single-trade profit — measures.

What this assumes, and where it stops

Assumptions

  • The whole position is bought at one price and sold at one price. Positions built or unwound in several parts need the Stock Average Calculator first.
  • Costs are entered as the total actually charged on each leg, whatever their composition.
  • Tax is applied at a single flat rate to the gain, and only when the trade is profitable.
  • Dividends are treated as cash received and untaxed. Dividend taxation differs from capital gains treatment in most jurisdictions.

Limitations

  • Real capital gains tax depends on holding period, jurisdiction, offsetting losses and your total income. A single flat rate is a simplification, not a tax calculation.
  • The bid-ask spread is not modelled separately — it is a real cost, absorbed in the prices you actually transacted at.
  • Currency movement on foreign shares is not accounted for, and can exceed the price move itself.
  • Nothing here accounts for opportunity cost or inflation, both of which affect whether a nominal profit was worth having.

Common questions

Why is my actual profit lower than the price difference suggests?

Because the price difference is the gross gain, not the return. Brokerage on both legs, exchange and regulatory charges, any transaction tax, and capital gains tax all sit between the two prices. On small positions these can consume a large share of the gain — a fixed charge of twenty on a five-thousand position is 0.4% of capital, paid twice. Entering them explicitly is the only way to see what actually reached you.

What exactly is the break-even sell price?

It is the price at which selling returns precisely what the position cost — no profit, no loss. It sits above your buy price by the combined cost of both legs, and drops by any dividends you collected. It matters because a position bought at 50 with costs does not break even at 50, and selling just above your entry price can still be a loss. Knowing the number turns "roughly even" into something you can actually check.

Should I include dividends in the return?

Yes, if you are measuring what the investment did for you. Total return — price change plus dividends — is the honest measure of a holding's performance, and for income-heavy shares dividends can be the larger part of it. Note that dividends are usually taxed differently from capital gains, so the after-tax figure here treats them as received in full rather than applying the capital gains rate to them.

Why does the annualised return disappear on short holdings?

Because it stops meaning anything. Annualising compounds a short result out to a full year, so a 5% gain over four days becomes a figure in the thousands of per cent — arithmetically correct, but describing a rate nobody sustains. The measure is genuinely useful for comparing holdings of months or years, so it is shown from about a month upward and withheld below that rather than presented as if it were a real expectation.

Sources

Formula and content last reviewed on .

Results are estimates for information only, not professional advice.

Report an error

Tools people commonly use alongside the stock profit calculator.

See all finance calculators →