Home/Guides/Stock profit and loss

Investing guide · Reviewed 28 August 2026

Realized profit is a simple subtraction — the nuance is in what it excludes.

Stock profit or loss on a single trade is one of the most mechanical calculations in investing. The number itself is easy; knowing what it leaves out is where most confusion happens.

Cost basis, proceeds, and the gap between them

Every realized stock trade reduces to two numbers: what you paid to open the position (cost basis — shares times buy price) and what you received when you closed it (proceeds — shares times sell price, minus any fees or commissions). Profit is simply proceeds minus cost basis. Return percentage takes that same dollar profit and divides it by the cost basis, turning it into a comparable rate rather than a raw dollar figure.

The percentage view matters because dollar profit alone can be misleading — a $500 profit means something very different on a $2,000 trade than on a $50,000 trade. Return percentage normalizes for that difference, though it says nothing about how long the capital was tied up to earn that return.

What a profit calculation leaves out

This kind of calculation covers price movement only. It excludes any dividends received during the holding period (separate income, typically taxed differently), the capital gains tax you may owe on the profit (which depends on your holding period and tax bracket), and the opportunity cost of having that capital tied up rather than deployed elsewhere. A trade that looks profitable in isolation can still be a mediocre outcome once holding period and available alternatives are considered.

Handling multiple purchases at different prices

If you bought shares across more than one purchase at different prices, use your blended average cost as the buy price in a profit calculation — plugging in only your most recent purchase price would misstate the trade's actual cost basis and overstate or understate the real profit.

Calculate your stock profit ↗ Find your blended cost basis first ↗

Frequently asked questions

How do I calculate profit on a stock trade?
Multiply shares by your buy price to get cost basis, multiply shares by your sell price and subtract fees to get proceeds, then subtract cost basis from proceeds. The result is your realized dollar profit or loss on that trade.
Why does my broker's number differ slightly from a simple calculation?
Brokers often factor in exact commission and regulatory fee amounts, may apply a different cost-basis lot (if you bought shares in multiple batches), and may report figures after specific tax withholding. A simplified calculator like this one won't match broker statements to the cent.
Is realized profit the same as return on investment?
Realized profit is a dollar amount; return on investment expresses that profit as a percentage of what you paid, which makes it easier to compare trades of different sizes. Both are useful, but they answer different questions.
Does profit calculated this way include dividends?
No. This is a price-only calculation covering the difference between your buy and sell price. If you held the position long enough to collect dividends, those are separate income and are typically taxed differently from capital gains.
Should I subtract taxes before comparing trades?
For decision-making, comparing pre-tax profit across trades is usually fine since it isolates the trade itself. But your actual take-home result depends on your tax bracket, holding period (short-term versus long-term capital gains), and jurisdiction — consult a tax professional for exact figures.

Source note: This guide describes a standard realized-profit calculation as a general illustration. All calculations happen in your browser — nothing you enter is sent to a server or stored. This is educational information, not investment or tax advice.