Skip to content
FinToolSuite
Updated 2026-05-14 · Investing · Educational use only ·
Privacy

Stock Profit and Loss Calculator

Profit or loss from a stock trade.

Calculate stock profit and loss from any trade. Enter buy price, sell price, shares, and commissions to see net gain or return percentage.

What this tool does

This calculator computes the net profit or loss from buying and selling a stock position. It takes your purchase price, sale price, number of shares, and total commissions paid (both on entry and exit), then reports the amount gained or lost and the percentage return that represents against the cost basis. The result shows what remains after all trading costs are deducted. Price difference and share count are the primary drivers of the outcome, while commissions reduce the final profit or increase the loss. For example, you might use this to review a completed trade and see how much you actually kept after fees. The calculator assumes a simple buy-and-sell scenario and does not account for dividends, taxes, or holding period effects. Results are shown for educational illustration of trade mechanics.

Quick answer: with the default values, the result is $280.00 (Net Profit). Adjust the values below for your own figures.


Enter Values

People also use

Formula Used
Sell price
Buy price

Disclaimer

Results are estimates for educational purposes only. They do not constitute financial advice. Consult a qualified professional before making financial decisions.

A trade's profit is the price difference multiplied by the share count, less what it cost to trade. On the tool's defaults, 100 shares bought at 12 and sold at 15 with 20 of commissions gives (15 − 12) × 100 − 20, or 280, which is 22.95% of the 1,220 cost basis. Commissions are a fixed amount against a variable gain, so their share of the outcome falls as trade size rises.

A worked example

With the defaults: buy price of 12, sell price of 15, shares of 100, total commissions of 20. The tool returns 280.00.

Here's a second scenario: you buy 500 shares at a price of 45, sell them at 52, and pay 125 in total commissions (entry and exit combined). The calculation runs as follows:

  • Gross profit = (52 − 45) × 500 = 3,500
  • Net profit = 3,500 − 125 = 3,375
  • Cost basis = 45 × 500 + 125 = 22,625
  • Percentage return = (3,375 ÷ 22,625) × 100 = 14.92%

In this case, commissions represent about 0.55% of the cost basis, leaving the overall return relatively unscathed. The same 125 in costs on a smaller trade, by contrast, would consume a much larger slice of profit.

What moves the number most

The two prices are the strongest levers, and they pull against each other. Raising each input by 1% of its own value moves the result 5.36% for the sell price, -4.29% for the buy price, 1.07% for the share count and -0.07% for commissions.

Two identities sit behind those figures. The sell and buy levers sum to the share lever, since the sell side contributes the sale proceeds and the buy side the outlay, and their difference is the gross gain. The share and commission levers sum to exactly 1, because the gross gain less commissions is the result itself. Both hold at every input vector, not only at these defaults.

The break-even sell price follows from the same arithmetic: the buy price plus commissions divided by shares, which is 12.20 on the defaults. Below that the trade loses money even where the share price rose.

Common scenarios where this matters

  • Short-term trading: When hold periods are brief, commissions and bid-ask spreads form a larger percentage of total return, making this calculation more sensitive to cost.
  • Position sizing: Traders evaluating whether to buy 100 shares or 1,000 shares can model how trade size affects the final dollar and percentage outcome.
  • Entry and exit planning: Comparing two different exit prices or two different purchase prices illustrates the minimum gain needed to break even after costs.
  • Broker selection: Swapping one commission figure for another shows the impact of brokerage fee structures on net returns.

What this does and does not capture

The calculator does compute the net profit or loss after subtracting all commissions from the gross gain. It expresses that outcome both in absolute currency terms and as a percentage return on your initial outlay.

The calculator does not account for taxes on gains, dividend income received during the holding period, changes in share price between purchase and sale that occur in real time (volatility), or the opportunity cost of capital tied up in the position. It treats the trade as a single transaction with a fixed entry and exit price, not a series of partial fills or adjustments.

Educational illustration

This result is for educational illustration only and models one scenario under simplified assumptions. Actual trading outcomes depend on market conditions, order execution, timing, and factors outside the scope of this tool.

Example Scenario

Your stock trade of 100 shares bought at $12 and sold at $15 resulted in a net profit or loss of $280.00.

Inputs

Buy Price:$12
Sell Price:$15
Shares:100
Total Commissions:$20
Expected Result$280.00
Expected Result breakdown
Gross P&L$300.00
Commissions$20.00
Return on Cost22.95%
Total Cost Basis$1,220.00

This example uses sample figures for illustration. Adjust the inputs above to match a specific situation and see how the result changes.

Sources & Methodology

Methodology

The calculator computes profit or loss by taking the difference between the sell price and buy price per share, multiplying by the number of shares held, then subtracting total commissions paid. This models a straightforward buy-and-hold trade where you purchase at one price and sell at another. The calculation assumes commissions are fixed and known upfront, applies no adjustment for timing or market conditions between trades, and does not account for dividend income, corporate actions, or partial position sales. Results reflect nominal gains or losses without consideration of tax liabilities, transaction fees beyond those entered, or the impact of holding period on returns.

Frequently Asked Questions

What costs does this leave out?
Several, depending on where and what is traded. Withholding tax on any dividends received during the holding period, transaction or transfer taxes where a market levies them, and currency conversion costs on foreign holdings all sit outside the figure. The tool subtracts only the commissions entered, so anything else has to go into that field or be accounted for separately.
Is the profit taxable?
That depends on the jurisdiction and on the account the holding sits in. Gains are commonly taxed above some annual threshold, and holdings inside a tax-advantaged account are often exempt. The figure here is pre-tax in every case, so what remains after tax will be lower wherever tax applies.
How much do commissions matter on a small trade?
A fixed commission is a larger share of a small trade than a large one. On a 1,000 position a 20 commission is a 2% drag before the price has moved at all, so the first 2% of any gain covers the cost of trading rather than adding to it. The same 20 on a 20,000 position is 0.1%. A larger trade size or a lower-commission broker reduces the percentage drag, since the cost is fixed while the base is not.
Can this be used on a position I still hold?
Yes, by entering the current market price as the sell price. The result then reads as unrealised profit or loss: what the position would return if closed at that price today. The commissions field should still carry both sides if the figure is meant to be net of the eventual sale.

Related Calculators

More Investing Calculators

Explore Other Financial Tools

Spotted something off?

Calculations or display — let us know.