Stock Profit Calculator: Know Your Gains and Losses

Stock Profit Calculator: Know Your Gains and Losses

Every stock trade involves multiple costs that eat into your profits: buy price, sell price, number of shares, commissions, and taxes. Our Stock Profit Calculator accounts for all these factors to give you a clear picture of your actual profit or loss on any stock trade. Whether you are a day trader or a long-term investor, knowing your true net gain helps you make better trading decisions.

Stock market trading and investment planning

How Stock Profit Is Calculated

The basic stock profit formula is: Profit = (Sell Price × Shares) - (Buy Price × Shares) - Commissions - Taxes. If you buy 100 shares at $50 each and sell at $60 each, with $10 commission per trade and 15% capital gains tax: buy cost = $5,010, sell revenue = $5,990, gross profit = $980, tax = $147, net profit = $833.

The calculator also works for short selling, where you sell first at a higher price and buy back later at a lower price. It handles fractional shares, dividends, and different tax rates for short-term versus long-term holdings.

Using the Stock Profit Calculator

Enter the number of shares, buy price per share, sell price per share, and any commissions or fees per trade. The calculator shows gross profit, net profit after fees, profit percentage, and total return including any dividends entered.

For tax-aware calculations, you can specify your capital gains tax rate. Short-term trades (held under 1 year) are typically taxed at ordinary income rates, while long-term trades benefit from lower capital gains rates.

Stock market analysis and profit calculation

Key Factors in Stock Profit

Commissions and Fees

Brokerage commissions, exchange fees, SEC fees, and clearing charges. Many brokers now offer commission-free trading, but some still charge $5-10 per trade. Even small fees add up for frequent traders.

Capital Gains Tax

Short-term gains are taxed as ordinary income (up to 37% in the US). Long-term gains (held over 1 year) are taxed at 0%, 15%, or 20% depending on income. Our calculator applies the tax rate you specify.

Dividends

Any dividends received during the holding period add to total return. Qualified dividends are taxed at long-term capital gains rates, while ordinary dividends are taxed as income.

Splits and Corporate Actions

Stock splits, mergers, and spin-offs affect your cost basis. The calculator allows you to adjust for these events by entering an adjusted share count or cost basis.

Trade Scenarios

  • Long position: Buy low, sell high. The classic strategy. Profit = (sell price - buy price) × shares minus fees and taxes.
  • Short position: Sell high, buy back low. Profit = (entry price - exit price) × shares minus fees. Used when you expect a stock to decline.
  • Dollar-cost averaging: Multiple purchases at different prices. The calculator handles average cost basis for positions built over time.
  • Wash sales: If you sell at a loss and repurchase within 30 days, the loss is disallowed for tax purposes. Our calculator flags potential wash sales.

Real-World Example

An investor buys 50 shares of a tech stock at $120 per share, holds for 14 months, and sells at $155 per share. Commission is $5 per trade. Long-term capital gains tax rate is 15%:

  • Total buy cost: (50 × $120) + $5 = $6,005
  • Total sell revenue: (50 × $155) - $5 = $7,745
  • Gross profit: $7,745 - $6,005 = $1,740
  • Capital gains tax (15%): $261
  • Net profit after tax: $1,479
  • Return on investment: ($1,479 / $6,005) × 100 = 24.6%
  • Annualized return: ~20.5% over 14 months

If the same trade were held only 11 months (short-term), taxed at 32% ordinary income rate, the net profit drops to $1,183 — nearly $300 less due to higher tax rate.

Start Calculating

Use our Stock Profit Calculator below to analyze your trades before you make them. Knowing your breakeven price and potential net profit helps you set realistic targets and stop-losses. Also check our Crypto Profit Calculator for cryptocurrency trades and our ROI Calculator for overall investment performance.