Stock profit calculator

This stock profit calculator gives the profit or loss on a share trade after commission on both the buy and the sell, as money and as a percentage of what you put in. It handles long and short trades, flat, per-share or percentage commissions, and an optional purchase duty, and it shows the exact exit price that breaks even.

Switching currency changes formatting only. Amounts are not converted.

Fractional shares are fine, for example 2.5.

$

$

$

Charged once on the buy and once on the sell.

$

%

Duty on the purchase
%

Applied to the buy in a long trade and the buy-back in a short one. The UK usually charges 0.5% when you buy shares.

Show the working

Every trade has a cost before it has a profit

Commission, the spread and duty all sit between the price move and what you keep. The Stock Market Trading Beginners Course covers the UK, US and European markets, technical and fundamental analysis, and risk management.

See the course

These are financial calculators made to make calculations easier and to help you find answers. They work only on the numbers you enter.

Trading stocks, forex, crypto and options carries a substantial risk of loss. This calculator does arithmetic on the numbers you enter and is not investment advice.

Worked example. Buying 100 shares at 50 dollars and selling at 65 dollars, with a 5 dollar commission on each trade, costs 5,005 dollars and returns 6,495 dollars: a profit of 1,490 dollars, or 29.77% of the money put in. The break-even sell price is 50.10 dollars.

How the exit price moves the result

Where the price gain went

The move in the share price, the costs taken off it, and what is left.

How do you calculate profit on a stock?

Take what the sale brought in after its commission and subtract everything the purchase cost, commission included: profit = (shares x sell price - sell commission) - (shares x buy price + buy commission). A negative answer is a loss.

The default trade buys 100 shares at $50 and sells them at $65, paying $5 on each trade. The purchase costs 100 x 50 + 5 = $5,005. The sale brings in 100 x 65 - 5 = $6,495. The difference, $1,490, is the profit. The share price rose $15, which on 100 shares is $1,500, and the two commissions took $10 of it.

The result card also shows the price at which the same trade would have made exactly nothing. Here that is $50.10: the sale has to recover the $5,005 outlay plus the $5 it costs to sell, so (5,005 + 5) / 100 = 50.10.

How do you work out stock profit as a percentage?

Divide the profit by the money you put in, costs included: return = profit / total cost of the buy x 100. On the default trade that is 1,490 / 5,005 = 29.77%.

That is a little less than the 30% rise in the share price, because the commissions sit on both sides of the sum: they shrink the profit on top and enlarge the cost underneath. The two figures answer different questions. The price change tells you how far the share moved. The return tells you how hard your money worked, which is the number to compare with a savings rate or another trade.

Neither is a yearly figure. A 29.77% return over three weeks and over three years are very different results, and the CAGR calculator turns a return over any period into a yearly rate.

Flat, per-share or percentage commission: what each costs

Platforms charge in one of three ways, and the calculator takes each one. Here is the default trade, 100 shares bought at $50 and sold at $65, under each:

CommissionPaid on both tradesProfitReturnBreak-even sell price
None$0$1,500.0030.00%$50.00
$5 a trade$10.00$1,490.0029.77%$50.10
$0.005 a share$1.00$1,499.0029.98%$50.01
0.1% of each trade$11.50$1,488.5029.74%$50.10

A percentage commission is the only one that grows with the price: the sell at $65 costs $6.50 against $5.00 on the buy. A flat fee weighs most on small trades. Buy just 10 shares on the same prices and the $10 of commission is 6.67% of the $150 price gain; the profit falls to $140, a 27.72% return, and the break-even sell price climbs to $51.00, a 2% rise just to stand still. On 1,000 shares the same flat fees leave $14,990 and move the break-even price only to $50.01.

Risk management on each trade is part of learning how the UK, US and European stock markets work. See the Stock Market Trading Beginners Course.

What is the break-even price of a stock?

It is the exit price at which the trade makes exactly zero after every cost. For a long trade it depends on how commission is charged:

  • Flat amount F per trade: (total cost of the buy + F) / shares.
  • Amount c per share: total cost of the buy / shares + c.
  • Percentage p of each trade: total cost of the buy / (shares x (1 - p)).

The break-even price is the honest starting line for any trade, because a sale at your own buy price is a loss once commission is paid twice. On the default trade the gap is 10 cents; on the 10-share version it is a full dollar. When several buys at different prices make up one holding, the stock average calculator works out the combined cost first.

Profit or loss on a short sale

A short trade sells borrowed shares first and buys them back later, so it gains when the price falls. Choose Short and the fields become the price you sold at and the price you bought back at. The profit is what the sale raised after commission, minus what the buy-back cost after commission.

Euro example. Short 200 shares at €40, buy them back at €34, paying €4 a trade. The sale raises €7,996 and the buy-back costs €6,804, a profit of €1,192, or 14.90% of the €8,000 short-sale value. Buying back at €39.96 would have broken even.

The arithmetic is not symmetrical in practice. A long position can lose at most what it cost, but a short has no ceiling on the price it may have to pay back: had the shares risen to €46 instead, the same trade would have lost €1,208. Short positions also carry costs this page does not model, such as the fee to borrow the shares and any dividends owed to the lender.

Stock profit calculator UK: adding the 0.5% duty

In the UK, a share purchase usually carries a 0.5% tax on the price you pay, according to GOV.UK's page on tax when you buy shares (checked November 2026). Bought electronically it is Stamp Duty Reserve Tax; on paper it is Stamp Duty, which applies when the transaction is over £1,000. The same guidance lists cases with no tax, such as subscribing to a new issue of shares, and notes that buying foreign shares outside the UK normally avoids both. Enter 0.5 under Duty on the purchase when it applies to your trade.

Pound example. Buy 400 shares at £2.50 and sell at £2.80, paying £9.95 a trade. The duty is £5.00, so the purchase costs £1,014.95 and the sale brings in £1,110.05: a profit of £95.10, or 9.37%. Without the duty the profit would be £100.10. The break-even sell price is about £2.5623, 2.49% above the buy price, and costs take 20.75% of the £120 price gain. The duty is charged on the purchase only, which is why the calculator applies it to the buy in a long trade and to the buy-back in a short one.

Worked example in dirhams, and any other currency

Buy 1,000 shares at AED 12.40 and sell at AED 13.10 with a commission of 0.15% of each trade. The buy costs AED 12,400 plus AED 18.60 of commission, and the sale brings in AED 13,100 less AED 19.65. The profit is AED 661.75, a return of 5.33% on AED 12,418.60, against a 5.65% rise in the share price. The break-even sell price is AED 12.4373.

The calculator works the same way in each of its 24 currencies; pick yours from the selector and the symbols and decimals follow it. It never converts between currencies. If you buy a share listed in another currency, enter the prices in that currency, or convert them yourself at the rates you actually paid, since a change in the exchange rate during the holding is part of your real result and is not shown here.

How to calculate stock profit in Excel or Google Sheets

Put the shares in B2, the buy price in C2, the sell price in D2 and a flat commission per trade in E2. Then:

  • Profit: =(B2*D2-E2)-(B2*C2+E2), which returns 1,490 for the default trade.
  • Return: =F2/(B2*C2+E2) with the profit in F2, formatted as a percentage.
  • Break-even sell price: =(B2*C2+2*E2)/B2.

For a percentage commission in E2 (0.1% entered as 0.001), the profit becomes =B2*D2*(1-E2)-B2*C2*(1+E2). For a short trade, put the price you sold short at in C2 and the buy-back price in D2; the profit is then =(B2*C2-E2)-(B2*D2+E2), and the return divides it by B2*C2.

What this calculator leaves out, and common mistakes

It does not work out tax on the gain, which depends on your country, your income and how long you held the shares; the capital gains tax calculator does that for the US, the UK, Canada and Australia. It also leaves out dividends received while you held the shares, minimum commission charges, currency conversion fees on foreign shares, and the bid-ask spread, which is already inside the prices you actually got.

  • Counting commission once. Most platforms charge on the buy and again on the sell.
  • Quoting the price change as the return. A 30% move earned 29.77% on the default trade, and less again after tax.
  • Using the quoted price instead of the fill. Enter the prices you were actually filled at.
  • Forgetting duty on a UK purchase. 0.5% on the buy is a cost like any other.
  • Treating a short like a long in reverse. A short can lose more than the money the sale raised.

Glossary

Long: a trade that buys first and sells later. Short: a trade that sells borrowed shares first and buys them back later. Commission: the platform's charge for carrying out a trade. Total cost of the buy: shares times price plus commission and any duty. Proceeds: what a sale brings in after its commission. Return: profit as a percentage of the money put in. Break-even price: the exit price at which profit after all costs is zero. Stamp Duty Reserve Tax: the UK tax on buying shares electronically.

Frequently asked questions

How do I calculate profit on a stock?

Subtract the total cost of the buy, commission included, from what the sale brought in after its commission. Buying 100 shares at $50 and selling at $65 with $5 a trade, that is $6,495 - $5,005 = $1,490.

How do I calculate stock profit as a percentage?

Divide the profit by the total cost of the buy and multiply by 100. A $1,490 profit on a $5,005 outlay is a 29.77% return, a little below the 30% rise in the share price because of commission.

What is the break-even price after commission?

With a flat commission it is the total cost of the buy plus the selling commission, divided by the number of shares. For 100 shares bought at $50 with $5 a trade, that is (5,005 + 5) / 100 = $50.10.

How is profit on a short sale calculated?

Take what the short sale raised after commission and subtract what the buy-back cost after commission. Shorting 200 shares at 40 and buying back at 34 with 4 a trade makes 7,996 - 6,804 = 1,192.

Do I pay tax when I buy shares in the UK?

Usually yes. GOV.UK's guidance, checked in November 2026, puts the usual rate at 0.5% of the price you pay, charged as Stamp Duty Reserve Tax when you buy electronically. Some purchases are exempt, such as subscribing to a new issue of shares.

Does this stock profit calculator include capital gains tax?

No. It stops at the profit before tax, because the tax depends on your country, income and holding period. Take the profit it gives you to the capital gains tax calculator for the US, UK, Canada or Australia.

Why is my return lower than the change in the share price?

Because commission is paid on both trades. It lowers the profit and raises the amount you put in, so a 30% price rise became a 29.77% return on the default trade, and a smaller trade with the same fees loses more of it.

How much does a flat commission matter on a small trade?

A lot more than on a large one. With $5 a trade, 10 shares bought at $50 need a sell price of $51.00 to break even, while 1,000 shares need only $50.01.

How do I calculate stock profit in Excel?

With shares in B2, buy price in C2, sell price in D2 and a flat commission in E2, use =(B2*D2-E2)-(B2*C2+E2). For the break-even sell price use =(B2*C2+2*E2)/B2.

Can I use this calculator in pounds, euros or dirhams?

Yes. Choose any of 24 currencies and enter the prices in that currency. The calculator formats the result for it and never converts between currencies, so convert foreign share prices yourself at the rate you actually paid.

Courses behind a share trade

Stock Market Trading Beginners Course

Structured online beginner program covering UK, USA, and European stock markets, technical analysis, fundamental analysis, risk management, and trading psychology.

See what the course covers

Stock Trading Rules and Strategies

Practical program explaining why trading rules matter and how traders apply predefined strategies for day trading and short-term market analysis.

See what the course covers

Fundamental Analysis Online Crash Course

Introductory course on evaluating companies before investing, covering fundamental analysis, business performance, market value, and practical stock selection methods.

See what the course covers

Sources and review

Last reviewed 13 November 2026 by the NIFM Academy editorial team. Next review by 13 May 2027.

  • GOV.UK, Tax when you buy shares, you usually pay 0.5% on the transaction, based on the price you pay; Stamp Duty Reserve Tax when buying electronically and Stamp Duty on paper transactions over 1,000 pounds; exemptions include subscribing to a new issue and, normally, buying foreign shares outside the UK. Checked 13 November 2026.
  • Trade profit arithmetic, profit = proceeds after commission - total cost of the buy; return = profit / total cost of the buy; break-even exit price solved for each commission type; shown in the working under every result. Checked 13 November 2026.

About these calculators. These are financial calculators made to make calculations easier and to help you find answers. Every result is arithmetic on the figures you enter. It is not a forecast, and it is not a recommendation to buy, sell or hold any security, currency, fund or product. NIFM Academy is an online education provider.

Amounts are shown in the currency you choose and are never converted between currencies. Any rate, allowance or tax figure the page fills in is dated where it appears, and you can change it.