Connect via MCP →

Enter Calculation

Formula

Show calculation steps (1)
  1. Return Percentage

    Return Percentage: Stock Profit / Loss Calculator

    Return % = Profit divided by Cost Basis, times 100

Advertisement

Results

Net Profit / Loss
2,000
after commissions
Total Cost Basis 10,000
Total Proceeds 12,000
Total Commissions 0
Return on Investment 20%

What is the Stock Profit / Loss Calculator?

This calculator tells you the true outcome of a stock trade by accounting for both the buy and sell commissions that brokers charge. Many traders look only at the difference between buy and sell price, but fees can quietly erode — or even reverse — a seemingly profitable trade. Enter your prices, share count, and commissions to see your net profit, total cost basis, total proceeds, and return on investment (ROI).

How to use it

Fill in the price you paid per share (buy price), the price you sold at (sell price), and the number of shares. Add any commissions charged when buying and selling. The result shows your net profit or loss after fees, along with the underlying numbers so you can verify each step.

The formula explained

The core calculation is Profit = (SellPrice − BuyPrice) × Shares − Commissions. Internally we compute a cost basis (buy price × shares + buy commission) and proceeds (sell price × shares − sell commission). Profit is simply proceeds minus cost basis. ROI is the profit divided by the cost basis, expressed as a percentage.

$$\text{Profit} = \text{Proceeds} - \text{Cost Basis}$$$$\text{where}\quad \left\{ \begin{aligned} \text{Proceeds} &= \text{Sell Price} \times \text{Shares} - \text{Sell Commission} \\ \text{Cost Basis} &= \text{Buy Price} \times \text{Shares} + \text{Buy Commission} \end{aligned} \right.$$$$\text{Return \%} = \frac{\text{Profit}}{\text{Cost Basis}} \times 100$$

Worked example

Suppose you buy 100 shares at $100 each with a $10 buy commission, then sell at $120 each with a $10 sell commission. Cost basis = \((100 \times 100) + 10 = \$10{,}010\). Proceeds = \((120 \times 100) - 10 = \$11{,}990\). Net profit = \(11{,}990 - 10{,}010 =\) $1,980, an ROI of about 19.78%.

$$\text{Net profit} = 11{,}990 - 10{,}010 = \$1{,}980$$

FAQ

Does this include taxes? No. The result is pre-tax. Capital gains tax rules vary by country and holding period, so consult a local tax resource.

What if I lost money? A negative profit means a loss; the ROI will also be negative.

Can I leave commissions blank? Yes — leave them as 0 if your broker charges no commission.

Last updated: