Stock Profit/Loss Calculator
Calculate stock trade profit or loss from buy price, sell price, shares, and fees.
Shows gross gain, net gain, return, and estimated capital gains tax.
Stock trade profit and loss calculation is essential for evaluating trade performance and for accurate tax reporting. The calculation differs depending on whether you’re doing a simple buy-sell, dealing with short sales, factoring in dividends, or calculating cost basis across multiple purchases.
Formulas: Gross Profit/Loss = (Sell Price − Buy Price) × Shares Net Profit/Loss = Gross P/L − Total Commissions − Fees Return % = (Net P/L ÷ Total Cost) × 100 Annualized Return % = ((1 + Return%)^(365 ÷ Days Held) − 1) × 100 Break-even Price = (Buy Price × Shares + Commissions) ÷ Shares
What each variable means:
- Buy Price: the price paid per share (cost basis per share)
- Sell Price: the price received per share at sale
- Shares: total number of shares in the transaction
- Commissions: brokerage fees (many brokers now charge $0, but some charge $4.95–$6.95 per trade)
- Cost Basis: the total amount invested, used for tax purposes
Tax implications (US):
- Short-term capital gain (held ≤ 365 days): taxed as ordinary income (10–37%)
- Long-term capital gain (held > 365 days): taxed at preferential rates (0%, 15%, or 20% depending on income)
- The difference can be enormous: a $10,000 gain taxed short-term at 32% = $3,200 tax. Long-term at 15% = $1,500 tax.
Worked example: Buy: 100 shares at $45.20 on March 1, 2023 (cost = $4,520) Sell: 100 shares at $67.85 on November 15, 2023 ($6,785) Commission: $0 (zero-commission broker)
Gross profit = ($67.85 − $45.20) × 100 = $22.65 × 100 = $2,265 Net profit = $2,265 − $0 = $2,265 Return % = $2,265 ÷ $4,520 × 100 = 50.1% Days held = 259 days Annualized return = ((1.501)^(365/259) − 1) × 100 = 73.1% annualized Tax rate: short-term (held 259 days < 365) — taxed as ordinary income
Break-even price (if commission were $9.95 total): ($4,520 + $9.95) ÷ 100 = $45.30/share