Enter how many shares you bought, the buy and sell prices and your broker’s fees. You get the profit or loss, the return on what you spent and the price you need just to break even.
Runs in your browser. Before tax, dividends and currency costs. Not investment advice.

This stock profit calculator is for anyone who buys shares or ETFs, from a first time investor to an active trader. It handles a flat fee per trade or a percentage commission, and it shows your gain or loss after fees, your return on the money you put in and the break even sell price. It works in dollars, pounds, euros or any other currency.
How Do You Calculate Stock Profit?
Stock profit is what you get from selling minus what you paid, with fees included. Multiply shares by the sell price and subtract the sell commission, then subtract shares times the buy price plus the buy commission. For example, 100 shares bought at $50 and sold at $65 with $5 fees each way give a $1,490 profit.
What Is the Formula for Stock Profit and Return?
Profit equals net sale proceeds minus total cost, and return equals profit divided by total cost times 100.
net proceeds = shares × sell price − sell commission
profit = net proceeds − total cost
return % = profit ÷ total cost × 100
break even price = (total cost + sell commission) ÷ shares
Your cost basis is the full amount you paid, including the buy commission. A commission is the fee a broker charges per trade. Many brokers now charge $0 on stock trades, but other costs remain, such as the bid ask spread, the gap between the price buyers pay and sellers get, plus stamp duty on UK shares and currency fees on foreign shares. For simple percentage changes in price, the percentage increase calculator works too.
What Is the Break Even Price on a Stock?
The break even price is the sell price at which your proceeds after fees exactly cover what you paid, so profit is zero.
With 100 shares bought at $50 and $5 commission each way, break even is ($5,005 + $5) ÷ 100 = $50.10. The table shows the same trade sold at different prices.
| Sell price | Profit or loss | Return on cost |
|---|---|---|
| $40 | -$1,010 | -20.18% |
| $45 | -$510 | -10.19% |
| $50 | -$10 | -0.2% |
| $50.10 | $0 | 0% |
| $55 | $490 | 9.79% |
| $65 | $1,490 | 29.77% |
| $75 | $2,490 | 49.75% |
Is Stock Profit Taxed?
Yes, in most countries a profit from selling shares is a capital gain and may be taxed, while a loss can often offset other gains.
In the US the IRS treats shares held for more than one year as long term, which usually gets lower rates than short term gains taxed like normal income. The UK taxes gains above a yearly allowance through Capital Gains Tax, unless the shares sit in an ISA. Dividends you received are not part of this tool’s profit. To see how a reinvested gain could grow, try the compound interest calculator, and the profit margin calculator covers business sales. This tool shows results before tax and is not investment advice.
Worked Example
Priya buys 100 shares at $50 and pays a $5 commission, then sells at $65 with another $5 fee. The tool shows a total cost of $5,005.00, net proceeds of $6,495.00 and a profit of $1,490.00, a 29.77% return on cost. Her break even sell price is $50.10. If she had sold at $45 instead, the tool shows a loss of -$510.00. With a 0.1% commission instead, 200 shares bought at $25 and sold at $30 give a profit of $989.00 and a break even price of $25.0501.
How Do You Use the Stock Profit Calculator?
Enter shares and prices
Type the number of shares, the price you paid per share and the price you sold or plan to sell at.
Add your commissions
Pick a flat fee per trade or a percentage, then enter the buy and sell commissions. Use 0 for free trades.
Read your profit or loss
The big number is net proceeds minus total cost. It turns into a loss below the break even price.
Check return and break even
The boxes show return on cost, the break even sell price, total cost and total fees paid.

Frequently Asked Questions
How do I calculate percentage gain on a stock?
Divide the profit by the total cost and multiply by 100. If you paid $5,005 including fees and made $1,490, the gain is 1,490 ÷ 5,005 × 100 = 29.77%. Ignoring fees gives 30%, which slightly overstates it.
Do commissions really change my profit much?
On small trades, yes. Two $5 fees on a $500 trade cost 2%, so the price must rise 2% before you break even. On a $50,000 trade the same $10 is only 0.02%, so it barely matters.
How do I work out profit if I bought shares at different prices?
Add up the total paid for all lots, including fees, and divide by the total shares to get an average cost per share. Use that average as the buy price, with commissions set to 0 if already included.
Does this calculator include dividends?
No. It shows the gain or loss from the price change and fees only. Add any dividends you received on top. For example, a $1 dividend per share on 100 shares adds $100 to your total return.
What is a short term versus long term capital gain?
In the US, shares held one year or less give a short term gain taxed at normal income rates. Shares held more than one year give a long term gain, usually taxed at 0%, 15% or 20%.
Can I use this for ETFs and fractional shares?
Yes. The maths is the same for ETFs, funds and fractional shares. Type a decimal number of shares such as 2.5, and the tool works out the cost, proceeds and break even price the same way.
Sources and Further Reading
- IRS Topic 409: Capital gains and losses
- IRS Publication 550: Investment income and expenses
- GOV.UK: Capital Gains Tax
Related Tools
Last reviewed: October 2026