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
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. In Australia, individuals who own shares for at least 12 months can usually halve the taxable gain with the 50% CGT discount. 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.
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
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.