Buy (Entry)
Sell (Exit)
Trade Result
Net Profit / Loss
$2,300
+51.11% return
Calculate gross and net profit or loss on a stock trade including cost basis and commissions.
Buy (Entry)
Sell (Exit)
Trade Result
Net Profit / Loss
$2,300
+51.11% return
The Stock Profit & Loss Calculator computes your exact gain or loss on a trade — accounting for the price you paid, the price you sold at, the number of shares, and any commissions or fees on either side. It shows both the gross profit (before fees) and the net profit (after fees), plus your percentage return on the capital you put in.
This is the calculation you'll want before reporting a sale on your taxes or simply deciding whether a trade was actually profitable once costs are factored in. Even small commissions can meaningfully reduce returns on smaller trades.
Net Profit = (Sell Price × Shares − Sell Commission) − (Buy Price × Shares + Buy Commission)Net profit is the difference between what you received when you sold (proceeds, after fees) and what you paid to acquire the shares (cost basis, including fees). Percentage return divides that profit by your original cost basis.
Example 1: A profitable trade with no commissions
Buy 100 shares at $45.00 ($4,500 cost basis), sell 100 shares at $68.00 ($6,800 proceeds), no commissions.
Net profit = $2,300 — a return of about 51.1% on the $4,500 invested.
Example 2: Same trade with commissions on both sides
Same 100-share trade ($45 buy, $68 sell), but with a $5 commission on the buy and a $5 commission on the sell.
Net profit drops to $2,290 (cost basis $4,505, proceeds $6,795) — commissions trimmed $10 off the gain, a small but real difference on larger trades.
Example 3: A losing trade
Buy 50 shares at $120 ($6,000 cost basis), sell 50 shares at $98 ($4,900 proceeds), $0 commissions.
Net loss = −$1,100, a return of about −18.3%. This loss can potentially offset capital gains elsewhere — see the Capital Gains Tax Calculator.
Methodology
Cost basis = buy price × shares + commissions. Proceeds = sell price × shares − commissions. Net P&L = Proceeds − Cost Basis. Return = Net P&L ÷ Cost Basis × 100.
Profit = (sell price × shares − sell commission) − (buy price × shares + buy commission). If positive, it's a gain. If negative, it's a loss you may be able to use to offset other gains.
Cost basis is the original purchase price plus any fees or commissions paid to acquire the shares. It is the starting point for calculating capital gains and is used on your tax return when you sell.
Realized gains occur when you actually sell shares — you owe tax on these. Unrealized gains exist only on paper while you still hold the shares. You do not owe tax on unrealized gains until you sell.
Disclaimer: Calculations are for informational purposes only and do not constitute professional financial advice. Please consult with a certified professional before making financial decisions.