stock market calculators

Stock Profit & Loss Calculator

Calculates net profit or loss from a stock trade, factoring in buy/sell commissions. Use it after closing a position to see your true return.

About this calculator

When you buy and sell shares, your real profit isn't simply the price difference — commissions on both legs of the trade reduce your take-home gain. The formula is: Net P&L = (sellPrice × shares − sellCommission) − (buyPrice × shares + buyCommission). The first bracket is your gross proceeds after the selling fee; the second is your total cost basis including the buying fee. Dividing Net P&L by the total cost basis and multiplying by 100 gives your return percentage. This matters because a seemingly profitable trade can turn into a loss once round-trip commissions are included, especially on smaller positions or brokers that still charge per-trade fees.

How to use

Suppose you buy 50 shares at $120 each with a $5 commission, then sell them at $135 with another $5 commission. Cost basis = (120 × 50) + 5 = $6,005. Gross proceeds = (135 × 50) − 5 = $6,745. Net P&L = $6,745 − $6,005 = $740. Return % = 740 / 6,005 × 100 ≈ 12.32%. Enter those five values into the calculator and it delivers the same result instantly, saving you the manual arithmetic.

Frequently asked questions

How do brokerage commissions affect stock profit calculations?

Commissions are paid on both the buy and the sell side, so they hit your P&L twice. Even a $5 fee each way costs $10 total, which directly reduces your net gain dollar-for-dollar. On a small position this can meaningfully lower your return percentage. Always include commissions for an accurate picture of trade profitability.

What is the difference between gross profit and net profit on a stock trade?

Gross profit is simply (sellPrice − buyPrice) × shares, ignoring any fees. Net profit subtracts both the purchase commission and the selling commission from that figure. The net figure is what actually hits your brokerage account. Comparing the two shows you exactly how much commissions are costing you per trade.

How do I calculate percentage return on a stock trade?

Divide your net profit by your total cost basis (buyPrice × shares + buyCommission) and multiply by 100. For example, a $740 net profit on a $6,005 cost basis equals a 12.32% return. This percentage lets you compare trades of different sizes on equal footing and benchmark them against index returns or other investments.