Home / Financial / Stock Profit Calculator
Stock Profit Calculator: Net Gain After Fees and Tax
Enter how many shares you bought and sold, the prices, and the fees charged on each trade. Add a tax rate if you want an after-tax figure. You also get the sell price needed to break even.
How the profit is worked out
A trade's true result includes every cost on both sides, not only the difference in price. The calculator uses these steps:
Total cost = shares × buy price + buy feesNet proceeds = shares × sell price − sell feesProfit before tax = net proceeds − total costReturn = profit after tax ÷ total cost
Fees can be a fixed amount, a percentage of the trade value, or both. In the example, 200 × 25 = 5,000 plus a 25 fee gives a cost of 5,025. The sale brings 6,000 less a 30 fee, or 5,970. Profit before tax is 945, tax at 20% is 189, and 756 remains, a return of about 15.0% on cost.
The break-even sell price
Because you pay to buy and to sell, you need a sale price above your purchase price just to recover. The break-even price solves net proceeds equal to total cost:
Break-even price = (total cost + fixed sell fee) ÷ (shares × (1 − sell fee %))
In the example it is 5,025 ÷ (200 × 0.995) = 25.25, which is 0.25 above the purchase price. On a small trade or one with a large flat fee the gap can be larger than it looks. Selling below the break-even price produces a loss even when the share price has risen since you bought.
Tax and what the optional rate means
If you enter a tax rate, it is applied only to a positive gain after fees. A loss is shown as it is, with no tax relief. Real systems differ widely. Some tax gains at different rates depending on how long you held the shares, some let you offset losses against other gains, some give an annual tax-free amount, and some do not tax gains at all for private investors. None of that is modelled here, so treat the after-tax figure as a rough guide and check the rules where you live.
What is not included
- Dividends and interest received while you held the shares.
- Currency conversion if the shares trade in a different currency from your account.
- Spreads and slippage, the gap between the price shown and the price you actually get.
- Partial sales at different prices. Run the calculator once for each lot.
- Stock splits and corporate actions, which change the share count and price.
Past results do not predict future ones. This tool does arithmetic on numbers you enter and is not investment advice. To express a gain as a percentage of any starting value, the percentage calculator works for quick checks.
Worked example
An investor buys 200 shares at 25 and sells them at 30. Each trade carries a 0.5% fee, and gains are taxed at 20%.
Inputs
| Number of shares | 200 |
|---|---|
| Buy price per share | 25 |
| Sell price per share | 30 |
| Buy fee, fixed amount | 0 |
| Buy fee, percent of trade value | 0.5 % |
| Sell fee, fixed amount | 0 |
| Sell fee, percent of trade value | 0.5 % |
| Tax rate on gains | 20 % |
Result
A return of 15.04% on the total cost of 5,025.00. Break-even sell price: 25.2513.
| Purchase value | 5,000.00 |
|---|---|
| Buy fees | 25.00 |
| Total cost | 5,025.00 |
| Sale value | 6,000.00 |
| Sell fees | 30.00 |
| Net proceeds | 5,970.00 |
| Profit before tax | 945.00 |
| Tax on gain | 189.00 |
| Profit after tax | 756.00 |
| Return on total cost | 15.04% |
| Break-even sell price per share | 25.2513 |
Net result at other sell prices (after fees and tax)
| Sell price | Profit after tax | Return on cost |
|---|---|---|
| 20 | -1,045.00 | -20.80% |
| 22.5 | -547.50 | -10.90% |
| 25 | -50.00 | -1.00% |
| 27.5 | 358.00 | 7.12% |
| 30 | 756.00 | 15.04% |
Financial disclaimer: Results are estimates for planning and education. They are not financial, tax or legal advice. Fees, taxes, rates and rules vary by lender, product and country, so confirm figures with your provider or a qualified adviser before making decisions.
Frequently asked questions
How do I calculate profit on a stock trade?
Subtract your total cost, which is the purchase value plus buying fees, from your net proceeds, which is the sale value minus selling fees.
What is the break-even price for a stock?
It is the sell price at which your net proceeds exactly equal your total cost, including fees on both trades. It is slightly above your purchase price whenever fees are charged.
Are fees included in the return percentage?
Yes. The return divides profit after fees and tax by the total cost including buying fees.
Does the calculator apply capital gains tax?
Only a flat rate you enter, applied to a positive gain. Real tax rules vary by country, holding period and personal circumstances.
Can I use fractional shares?
Yes. The number of shares accepts decimals, so you can model fractional-share purchases.
Related calculators
References and sources
- Bodie, Kane and Marcus, Investments: chapters on securities trading and the calculation of returns.
- Your broker's fee schedule and your national tax authority's guidance on gains set the actual fees and tax.