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.
| Sell at | Before fees | After fees | Return |
|---|---|---|---|
| $20.50 | $5.00 | -$4.90 | -2.39% |
| $21.00 | $10.00 | $0.10 | 0.05% |
| $22.00 | $20.00 | $10.10 | 4.93% |
| $25.00 | $50.00 | $40.10 | 19.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
Add the buy fee to what you paid for the shares, subtract the sell fee from what you received, and take the difference. If you buy 10 shares at $100 with a $5 commission, your cost is $1,005. Selling them at $120 with another $5 commission brings in $1,195, so your net profit is $190. Each fee is counted once, on the trade it belongs to.
Gross profit is the price difference alone: (sell price โ buy price) ร number of shares. Net profit is what's left after trading fees. On small trades, fees can wipe out most of a gain: 10 shares bought at $20 and sold at $21 make $10 before fees, but with a $4.95 commission each way, the net profit is just $0.10.
In some countries, yes. In the US, shares held for more than one year produce long-term gains, taxed at 0%, 15% or 20% depending on income, while gains on shares held for a year or less are taxed as ordinary income. Australia has its own capital gains rules for shares; check the ATO for the current ones. The UK and Canada don't use holding periods in the same way. In the UK, gains above the ยฃ3,000 annual allowance are taxed at 18% or 24% depending on income, and in Canada half of a capital gain is included in taxable income. Rules change, so check with your tax authority. The figures above are before tax.
Usually not without losing the tax benefit. In the US, the wash sale rule disallows the loss if you buy substantially identical shares within 30 days before or after the sale. Canada has a similar superficial loss rule, also covering 30 days either side. In the UK, shares you buy back within 30 days are matched with the ones you sold, which changes the gain or loss you report. Check the details with your tax authority or an adviser before relying on a loss.
No, and nobody can reliably predict the right moment to sell. What it does show is your break-even sell price: the lowest price at which the sale covers what you paid, including the buy fee, plus the fee on the sale itself. For 150 shares bought at $42.50 with a $6.95 commission each way, that's $42.60. Selling at $42.59 would still lose $0.40. It also shows exactly what a sale at any price you enter would leave you with after fees, so you can compare scenarios. How long you've held the shares can affect the tax you pay, which is worth checking before you sell.
Not directly. It's built for buying and selling shares or ETFs, including fractional shares. Options involve premiums, strike prices, expiry dates and contracts that usually cover 100 shares, so the profit calculation is different.
Yes, for your total return. This calculator measures the trade itself: the price change minus fees. Dividends paid while you held the shares are extra income, so add them to the net profit for your total return. The Dividend Yield Calculator works out what a share pays a year at today's price.
Not on this page: it's built for buying shares and later selling them. The Trade P&L Calculator handles long and short trades, crypto with many decimal places, extra costs such as borrow fees, and leverage.
Keep going
Related calculators
- Trade P&L CalculatorProfit or loss on long or short stock, crypto and other trades after fees
- ROI CalculatorReturn on an investment after every fee and cost, in percent and dollars
- Dividend Yield CalculatorA share's yearly dividend yield, and the income your shares would pay
- CAGR CalculatorThe steady yearly growth rate between two values over any period
- Position Size CalculatorHow many units to trade from your risk amount and stop-loss
More tools like this are in Investment Calculators.
Where this comes from
Sources
- IRS: Topic 409, capital gains and losses (US)(opens in a new tab)
- IRS: Publication 550, wash sales (US)(opens in a new tab)
- GOV.UK: Capital Gains Tax rates and allowance(opens in a new tab)
- GOV.UK: tax when you buy shares (0.5% Stamp Duty Reserve Tax)(opens in a new tab)
- GOV.UK: HS284 shares and Capital Gains Tax (30-day rule)(opens in a new tab)
- Canada Revenue Agency: capital losses, inclusion rate and superficial losses(opens in a new tab)
The Australian capital gains mention isn't linked to a source yet (the ATO page couldn't be checked).
Last reviewed: October 2026. Built and maintained by FinCalcBox; see About.