Stock Profit and Loss Calculator
Calculate profit or loss, return on investment, break-even selling price and after-tax gain on a stock trade, including fees.
Results are mathematical estimates from the values you enter. They are not financial, tax or investment advice.
How to use this calculator
Enter the price you paid, the price you sold at (or a target price), the number of shares and the fees on each trade. The calculator gives the net profit or loss, the return on what you invested, the price you need to break even after fees, and the profit after capital gains tax.
Formula
Cost = buy price × shares + buy fees. Proceeds = sell price × shares − sell fees. Profit = proceeds − cost. ROI = profit ÷ cost. Break-even sell price = (cost + sell fees) ÷ shares. After-tax profit = profit × (1 − tax rate) when profit is positive.
Calculator credits
Calculator developmentJulia Edwards
Editorial supervisionSamad Aslam Khan
Expert reviewQasimACCA, CFA, Senior Financial Analyst
Published byThe Calculatorz
Last updated
Read how we research, test, review and correct our calculators in our editorial policy.
Frequently asked questions
How do I calculate stock profit?
Subtract the total cost (price × shares + buying fees) from what you receive (price × shares − selling fees).
What is a break-even price?
The selling price at which you recover the purchase price and all fees, so the trade makes neither profit nor loss.
Are losses taxed?
No. Losses can often offset other gains for tax purposes; rules depend on your country and holding period.
Should I include dividends?
Dividends received add to your total return but are usually taxed separately. Add them to the result for a full picture.
What is ROI?
Return on investment: profit divided by the amount invested, shown as a percentage.
Do holding periods matter for tax?
In many countries, gains on shares held longer than a set period are taxed at a lower rate. Check your local rules.
References & methodology sources
These sources support the calculator’s formula, definitions, thresholds, units or result interpretation.
- U.S. Securities and Exchange Commission. (n.d.). Stocks. View source
- Bodie, Z., Kane, A., & Marcus, A. J. (2024). Investments (13th ed.). McGraw Hill. View source
- U.S. Securities and Exchange Commission. (n.d.). Build wealth over time through saving and investing. Investor.gov. View source
- U.S. Securities and Exchange Commission. (n.d.). Investor bulletin: Stop, stop-limit, and trailing stop orders. Investor.gov. View source