Blog
Custom Print on Demand Apparel — Free Storefront for Your Business
Wild & Free Tools

How to Calculate Stock Profit and Loss — Formula + Examples

Last updated: April 20268 min readCalculator Tools

Stock profit = (Sell Price - Buy Price) × Shares - Fees. That is the whole formula. This guide walks through it with real numbers, covers edge cases, and gives you a free calculator to skip the math.

The Formula

Three numbers you need:

  1. Gross Profit per Share = Sell Price - Buy Price
  2. Gross Profit Total = Gross Profit per Share × Number of Shares
  3. Net Profit = Gross Profit Total - Buy Commission - Sell Commission

Step-by-Step Example

You bought 75 shares of XYZ at $42.00. You sold at $56.50. Your broker charged $4.95 per trade.

  1. Gross profit per share: $56.50 - $42.00 = $14.50
  2. Gross profit total: $14.50 × 75 = $1,087.50
  3. Total fees: $4.95 + $4.95 = $9.90
  4. Net profit: $1,087.50 - $9.90 = $1,077.60

For ROI:

  1. Total cost: ($42.00 × 75) + $4.95 = $3,154.95
  2. ROI: ($1,077.60 / $3,154.95) × 100 = 34.16%

Skip the math: Stock Profit Calculator does this instantly.

Enter your numbers, get profit + ROI instantly.

Calculate Stock Profit →

More Examples

ScenarioBuySellSharesFeesNet ProfitROI
Quick flip$18.00$21.50200$0$700.0019.4%
Long hold$35.00$89.00100$0$5,400.00154.3%
Small loss$120.00$115.0030$0-$150.00-4.2%
With commission$55.00$68.00150$9.95 each$1,930.1023.4%
Dollar cost avg$47.50 avg$62.00300$0$4,350.0030.5%

Understanding Cost Basis

Cost basis is your total investment in a position. It matters for taxes.

Your broker tracks cost basis for you, but knowing how it works helps you make better sell decisions.

Calculating Loss for Tax Purposes

Stock losses are not just bad news. In the US, you can use capital losses to offset capital gains, reducing your tax bill. If losses exceed gains, you can deduct up to $3,000 per year from ordinary income and carry forward the rest.

The calculator shows losses clearly in red. If you are considering selling a losing position for tax-loss harvesting, run the numbers first to see the exact loss amount.

What the Formula Does NOT Cover

Related: Percentage Calculator for quick math, Compound Interest Calculator for long-term growth.

Launch Your Own Clothing Brand — No Inventory, No Risk