Stock Profit / Loss Calculator

Stock Profit / Loss Calculator

Growing AI Skill PRO

Enter Calculation

Results

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

Formula

Profit=Proceeds−Cost Basiswhere{Proceeds=Sell Price×Shares−Sell CommissionCost Basis=Buy Price×Shares+Buy Commission\begin{gathered} \text{Profit} = \text{Proceeds} - \text{Cost Basis} \\[1.5em] \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. \end{gathered}
Show calculation steps (1)
  1. Return Percentage

    Return %=ProfitCost Basis×100\text{Return \%} = \frac{\text{Profit}}{\text{Cost Basis}} \times 100

    Return % = Profit divided by Cost Basis, times 100

Usage stats

Advertisement

Report an error on this page

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$$
Advertisement

Key Terms: Cost Basis, Proceeds, ROI and Commission

Cost basis
The total amount you paid to acquire the shares: buy price × shares plus any buy commission. Here it is a simple purchase cost and does not include tax adjustments.
Proceeds
The cash you receive from the sale after fees: sell price × shares minus the sell commission.
Commission
A fee a broker charges to execute an order. It may be a flat amount per trade, a per-share amount, or zero, depending on the broker and account.
Gross profit vs. net profit
Gross profit is (sell price − buy price) × shares, before any fees. Net profit is proceeds minus cost basis, so it is gross profit minus both commissions.
Net profit/loss
The final gain (positive) or loss (negative) on the trade after buy and sell commissions.
Return on investment (ROI)
Net profit divided by cost basis, shown as a percentage: \(\text{ROI} = \dfrac{\text{Net Profit}}{\text{Cost Basis}} \times 100\).
Break-even price
The sell price per share at which net profit is exactly zero, once both commissions are covered.

Pre-tax result: the calculator's figures do not subtract capital gains tax or any other tax. Tax rules differ by country and by account type.

Interpreting Your Result

A positive net profit means proceeds exceeded cost basis, so the trade made money after commissions. A negative value is a net loss, and zero means you broke even. A trade can show a gain in price terms and still have a negative net result if commissions exceed the gross gain, as in Scenario A.

What the return % means

Return % is measured against cost basis, which includes the buy commission. A 3.96% return means net profit equals 3.96% of the total amount you paid in. A loss is shown as a negative percentage of the same base.

Break-even sell price

Set net profit to zero and solve for the sell price:

$$\text{Break-even Sell Price} = \frac{ \text{Buy Price} \times \text{Shares} + \text{Buy Commission} + \text{Sell Commission} }{ \text{Shares} }$$

Example: buy at 50.00, 100 shares, 5 commission each side. Break-even = \((50 \times 100 + 5 + 5) \div 100 = 50.10\). Check: proceeds \(50.10 \times 100 - 5 = 5{,}005\), cost basis \(5{,}000 + 5 = 5{,}005\), so profit is 0. Any sell price above 50.10 gives a net gain, and any price below gives a net loss.

What the result does not include

  • Per trade, not annualized: the return % covers the whole holding period, whether it was a day or several years. It cannot be compared directly with annual rates.
  • No taxes: the figures are before any tax on gains.
  • No dividends: income received while holding the shares is not counted.
  • No slippage: if your order filled at a different price than you entered, enter the actual fill prices to get an accurate result.

This is general information about how the calculation works, not investment, tax, or financial advice.

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:

Most popular in Financial

View all Financial calculators