The concept
Profit, cost basis and return in one calculation
Stock profit is the difference between what you paid to establish a position (cost basis) and what you received when you closed it (proceeds), after subtracting any trading fees or commissions. Return percentage expresses that same dollar profit relative to your original cost, which makes it easier to compare trades of different sizes.
This calculation only covers a single realized trade — it doesn't account for dividends received while holding the position, taxes owed on the gain, or the opportunity cost of capital tied up in the position. A profitable trade in dollar terms can still be a mediocre outcome once holding period and alternatives are considered.
The method
How the calculation works
Total cost basis is calculated by multiplying shares by the buy price. Total proceeds are calculated by multiplying shares by the sell price and subtracting fees. Profit is proceeds minus cost basis, and return percentage divides that profit by the cost basis.
Total cost basis is shares multiplied by buy price. Total proceeds are shares multiplied by sell price, minus any fees. Profit is the difference between the two.
Worked example
A neutral example
For 100 shares bought at $50 and sold at $65 with $10 in total fees, the calculator computes the net dollar profit and the percentage return on the original $5,000 invested.
This example explains the method. It does not recommend a financial action or predict an outcome.
Frequently asked
Stock Profit Calculator questions
Does this include dividends I received while holding the stock?+
No. This calculator only measures the price-based profit or loss from buying and selling shares. If you also received dividends during the holding period, add them separately to get your total return, and note that dividends are typically taxed differently from capital gains.
Does the profit shown account for capital gains tax?+
No. This is a pre-tax profit calculation. Capital gains tax treatment depends on your holding period (short-term vs long-term), your tax bracket, and your local tax rules — consult a tax professional to estimate what you'd owe.
How should I account for multiple purchases at different prices?+
If you bought shares in multiple lots at different prices, use a blended average cost as your buy price — the cost basis calculator can compute that average for you before you use this profit calculator.