How to use the stock profit calculator
- Enter the buy price and sell price per share.
- Enter the number of shares, or switch to the amount you invested.
- Add any buy and sell commissions.
- Optionally enter a tax rate to see the profit you keep.
The formulas
- Total cost = shares × buy price + buy commission
- Sale proceeds = shares × sell price − sell commission
- Profit or loss = proceeds − total cost
- Return = profit ÷ total cost × 100
- Break-even price = (shares × buy price + all commissions) ÷ shares
Example
You buy 50 shares at $40.00 and sell them at $46.50, paying a $5 commission each way.
| Total cost | 50 × $40.00 + $5 = $2,005.00 |
| Sale proceeds | 50 × $46.50 − $5 = $2,320.00 |
| Profit | $315.00 |
| Return | 15.71% |
| Break-even price | $40.20 |
Why the break-even price matters
Commissions mean the share price has to rise a little before you make anything. The break-even price is the lowest price at which selling gets all your money back. On small trades, fees can swallow a large share of the gain: a $5 commission each way on a $200 position needs a 5% rise just to break even.
Short-term and long-term capital gains
In many countries the tax on a gain depends on how long you held the shares. In the United States:
| Holding period | Called | Federal tax |
|---|---|---|
| One year or less | Short-term gain | Taxed as ordinary income, 10% to 37% |
| More than one year | Long-term gain | 0%, 15% or 20%, depending on income |
Other countries have their own rules, allowances and rates. Enter the rate that applies to you in the tax box for an estimate. Losses can often be set against gains to reduce the tax owed.
Averaging several purchases
If you bought the same stock at different prices, use your average cost per share as the buy price:
Average cost = total amount paid ÷ total shares
Buying 10 shares at $50 and 30 shares at $40 gives (500 + 1,200) ÷ 40 = $42.50.
What the calculator leaves out
- Dividends received while you held the shares. Add them to your profit for the total return.
- Currency changes, if the stock is priced in a different currency from your account.
- Inflation. A 5% gain in a year with 4% inflation is a 1% gain in buying power.
- Time. A 20% return in one year is far better than 20% over five years. Compare investments held for different periods with the compound interest calculator.
Realized and unrealized gains
A gain is unrealized, sometimes called a paper gain, while you still hold the shares. It becomes realized when you sell, and in most places that is the moment tax becomes due. Enter today's market price as the sell price to see your unrealized position.
This calculator gives estimates for planning. It is not financial or tax advice. Prices, fees and tax rules vary, so check the figures with your broker, exchange or a tax professional.