Stock Profit/Loss Calculator
Calculate profit or loss on a share trade after commission, including dividends received.
Please note: For information only, not investment advice. Share prices can fall as well as rise and past performance does not predict future results.
What the Stock Profit/Loss Calculator does
Total return on a share position is the capital gain plus any dividends received, net of commission on both sides. Ignoring dividends understates the return on income-paying shares, sometimes substantially.
Formula
Cost = Buy price × Shares + Buy commissionProceeds = Sell price × Shares − Sell commissionTotal profit = Proceeds − Cost + DividendsReturn % = Total profit ÷ Cost × 100
Inputs explained
| Input | Unit | Required | Notes |
|---|---|---|---|
| Buy price per share | selected currency | Yes | Accepts more than 0. |
| Sell price per share | selected currency | Yes | Accepts more than 0. |
| Number of shares | number | Yes | Accepts more than 0. |
| Buy commission | selected currency | Optional | Accepts 0 or more. |
| Sell commission | selected currency | Optional | Accepts 0 or more. |
| Dividends received | selected currency | Optional | Accepts 0 or more. |
| Currency | one of 10 options | Optional | — |
How to use it
- Choose Currency.
- Enter Buy price per share, Sell price per share and Number of shares.
- Optionally add Buy commission, Sell commission and Dividends received.
- Select Calculate.
Worked example
200 shares bought at $45, sold at $58, $10 commission each way, $180 of dividends.
- Buy
- 45
- Sell
- 58
- Shares
- 200
- Commission
- 10 / 10
- Dividends
- 180
Cost $9,010, proceeds $11,590, capital gain $2,580 plus $180 dividends = $2,760, a 30.6% return.
Reading the result
- Total return is divided by cost alone, not cost plus dividends — a position with a strong dividend can show a healthy total return even with a flat or negative capital gain, so it is worth reading the two components separately, not just the combined figure.
- The gap between "price change" and "total return" is exactly what commission and dividends added or subtracted — a wide gap usually means dividends did most of the work, not the share price.
Assumptions and limitations
- Commission is a flat amount per side, not a percentage-of-trade-value model — a broker's percentage fee needs converting to a dollar figure before entering it here.
- Dividends are entered as one total for the whole holding period, not a schedule, so the calculator cannot show when they arrived or whether they were reinvested.
Common mistakes
- Comparing this return against a benchmark's total-return figure while having left dividends out of this calculation — that compares a price-only number against an income-inclusive one.
- Comparing this percentage across holdings of very different lengths without adjusting for time — a 30% return over three months and over three years are very different outcomes this figure alone does not distinguish.
Frequently asked questions
Should I include dividends in my return?
Yes. Over long periods reinvested dividends have accounted for a large share of total equity returns. A price-only figure understates what you actually earned.
Why is my break-even above my buy price?
Because commission is charged on both the purchase and the sale. The shares must rise enough to cover both before you profit.