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
Financial Health
Index Fund vs Active Fund Calculator
Compare index fund vs active fund final wealth over a multi-decade horizon, accounting for the compounding effect of fee drag.
Investing
Stock Portfolio Value Calculator
Calculate total stock portfolio value from individual position values, for a single snapshot of where every holding stands today.
Investing
Stock Split Calculator
Calculate the new share count and adjusted per-share price after a whole-number forward stock split such as 2-for-1, 3-for-1, or 4-for-1.
Formula Used
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.
Your stock trade of 100 shares bought at $12 and sold at $15 resulted in a net profit or loss of $280.00.
Inputs
| Gross P&L | $300.00 |
|---|---|
| Commissions | $20.00 |
| Return on Cost | 22.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?
Is the profit taxable?
How much do commissions matter on a small trade?
Can this be used on a position I still hold?
Related Calculators
Index Fund vs Active Fund Calculator
Compare index fund vs active fund final wealth over a multi-decade horizon, accounting for the compounding effect of fee drag.
Stock Portfolio Value Calculator
Calculate total stock portfolio value from individual position values, for a single snapshot of where every holding stands today.
Stock Split Calculator
Calculate the new share count and adjusted per-share price after a whole-number forward stock split such as 2-for-1, 3-for-1, or 4-for-1.
More Investing Calculators
Investing
100 Minus Age Asset Allocation Calculator
Calculate stock-vs-bond allocation using the 100-minus-age rule of thumb: see the percentage split the rule produces for any age you put in.
Investing
Active vs Passive Investing Calculator
Compare an active fund against an index tracker over any horizon, and see the gross return active needs just to break even after charges.
Investing
Annualized Return Calculator — Any Holding Period
Convert any holding-period return into an annualized rate. Enter start value, end value, income, and months held — including periods under a year.
Investing
Annuity Present Value Calculator
Calculate the present value of an ordinary annuity from regular payments, periodic rate, and the number of periods until the stream ends.
Investing
APR to APY Calculator
Convert a stated annual rate to its effective annual yield at any compounding frequency, with the gap in percentage points and the continuous ceiling.
Investing
Asset Allocation Calculator
Model a stock, bond and cash split from age and risk tolerance using the 110-minus-age rule, and see the amounts each allocation implies.
Explore Other Financial Tools
Savings
Investment Doubling Time Calculator
Calculate investment doubling time using exact logarithms and the Rule of 72 approximation — compare results across annual return rates.
Savings
Bucket Retirement Strategy Calculator
Allocate retirement savings across three buckets — immediate cash, medium-term income, and long-term growth. Enter retirement pot to see each bucket's amount.
Digital Nomad & Freelance
Coworking vs Office Calculator
Compare total cost of a coworking membership versus a dedicated office over a chosen planning horizon, including utilities and setup.
Spotted something off?
Calculations or display — let us know.