Stock Profit Calculator

Use this stock profit calculator to find the true result of a trade — total profit or loss and percentage return after commissions — plus the sell price you need just to break even.

1Enter the shares and buy price
2Add the sell price and commissions
3See your profit and return
—return on cost
—total cost (incl. buy fees)
—total proceeds (after sell fees)

Private by design: 100% in your browser — nothing is uploaded, no sign-up. This tool runs entirely on your device.

The price chart says a stock rose from $45 to $58 — a gain of $13 a share. But what you actually keep is a different number, because two commissions came out along the way and because the gain only means something relative to the money you put in. This calculator works the trade the way your brokerage statement does: everything you paid to get in, everything you received getting out, the difference between them, and that difference as a percentage of your stake. It works for shares, funds, crypto or anything else bought and sold in units — and it is just as honest about losses, which are the same calculation with a minus sign.

The stock profit formula

Profit = (Shares × Sell price − Sell commission) − (Shares × Buy price + Buy commission)

The first bracket is your total proceeds — what actually lands in your account from the sale. The second is your total cost — what actually left your account to buy, including the buy commission. The percentage return divides the profit by that total cost, which is the fair denominator: it is the return on every dollar the trade consumed, fees included. One figure worth knowing before you sell is the break-even sell price: (total cost + sell commission) ÷ shares. It is the price below which a "gain" on the chart is still a loss in your account — with small trades and fixed fees, it sits noticeably above the buy price, and the note under your results above shows it for your figures.

Worked example

You buy 100 shares at $45 and pay a $4.95 commission, so your total cost is $4,500 + $4.95 = $4,504.95. You later sell at $58 with another $4.95 commission, so your proceeds are $5,800 − $4.95 = $5,795.05. Profit = $5,795.05 − $4,504.95 = $1,290.10, and the return is $1,290.10 ÷ $4,504.95 = 28.64%. The chart gain of $13 a share suggested $1,300; the commissions quietly took $9.90 of it. Your break-even sell price on this trade is ($4,504.95 + $4.95) ÷ 100 = $45.10 — the stock had to rise ten cents a share before you were truly ahead at all.

Reading gains and losses honestly

TradeTotal costProceedsProfit / lossReturn
100 shares, $45 → $58, $4.95 fees each way$4,504.95$5,795.05$1,290.1028.64%
50 shares, $80 → $62, no fees$4,000.00$3,100.00−$900.00−22.50%
10 shares, $45 → $58, $4.95 fees each way$454.95$575.05$120.1026.40%

Compare the first and third rows: the same stock, the same prices, the same percentage rise — but the small trade keeps less of it, because the fixed $9.90 of fees is spread over ten shares instead of a hundred. Fees punish small, frequent trades hardest, which is worth remembering before splitting one purchase into several. The second row shows the other discipline this calculator enforces: losses measured properly. A fall from $80 to $62 feels like "down $18"; measured as a return it is −22.50%, and recovering from it needs a rise of 29.03% from the lower price, not 22.50% — losses and gains are not symmetric, and the percentage column is what keeps that visible. For money still invested rather than sold, the Compound Interest Calculator projects how it grows over time, and the Net Worth Calculator places the result inside your overall financial picture.

Bought in several chunks? Use your average price

Many positions are built in more than one purchase — 60 shares at $40 in January, 40 more at $52 in June. To use this calculator for the whole position, first work out your average buy price: total spent on shares ÷ total shares. In that example you spent $2,400 + $2,080 = $4,480 for 100 shares, an average of $44.80 a share. Enter 100 shares at $44.80, add up the commissions from all the buys into the buy-commission field, and the result is the true profit on the full position. The same approach works in reverse if you sell in stages: run each sale separately against the same average cost, and the profits add up to the whole.

Frequently asked questions

How is stock profit calculated?

Profit = (shares × sell price − sell commission) − (shares × buy price + buy commission). The percentage return is that profit divided by the total amount you put in — shares × buy price + buy commission — multiplied by 100.

Why include commissions in the calculation?

Because they are a real cost of the trade. A small price rise can look like a win until the buy and sell commissions are subtracted. Including them from the start shows the result you actually keep, and it matters most on small trades where fixed fees are a larger share of the money involved.

What is the break-even sell price?

The sell price at which the trade makes exactly zero: (total buy cost + sell commission) ÷ shares. Any sale above it is a profit; any sale below it is a loss. This page shows it in the note under your results once you enter your figures.

How do I calculate a loss on a stock trade?

The same way as a profit — if the sell side comes to less than the buy side, the result is simply negative. For example, 50 shares bought at $80 and sold at $62 with no commissions give (50 × $62) − (50 × $80) = −$900, a loss of 22.50%.

Does this calculator include dividends?

No. It measures the trade itself: buy cost against sell proceeds. Dividends received while you held the shares are extra return on top — add them to the profit figure yourself if you want your total return from the position.

Does the result include tax on capital gains?

No. Tax on investment gains depends on your country, how long you held the shares and your other income, so it cannot be folded into a general calculator. Treat the result as your pre-tax profit or loss.

Can I use this for crypto or other assets?

Yes — the maths is the same for anything you buy and later sell: enter the quantity as 'shares', the price per unit at buying and selling, and any fees as commissions. It also works for partial units, such as 0.5 of a coin.

What is the difference between profit and return percentage?

Profit is the amount of money gained or lost; return percentage is that amount relative to what you put in. A $100 profit is excellent on a $500 investment (20%) and modest on a $50,000 one (0.2%). The percentage is what lets you compare trades of different sizes fairly.

Is this stock profit calculator free and private?

Yes. It is free with no sign-up, and the calculation runs entirely in your browser — your trades and prices never leave your device.

Related tools