Finance, Investing and Stock Market
Stock Profit and Loss Calculator
Work out the realised profit or loss on shares you have sold, including purchase and selling fees, the return on the shares sold, the break-even selling price, and — when you enter a current price — the unrealised gain or loss on the shares you still hold. Every figure is typed in by you; nothing is fetched from the market.
Calculation History
Your recent calculations on this device. Stored only in your browser, never uploaded.
No calculations yet on this device.
How to Use
Enter the stock name or ticker if you want it shown in the result, then the quantity purchased and the price paid per share, the quantity sold and the selling price per share, and any purchase and selling fees. Choose a currency — it is only a display label and amounts are never converted. Optionally enter the current market price to see the unrealised gain or loss on the shares you still hold. Press Calculate.
Formula and Methodology
Total purchase cost = quantity purchased x purchase price + purchase fees. Gross sale value = quantity sold x selling price. Net sale proceeds = gross sale value - selling fees. Cost of the shares sold = quantity sold x purchase price + purchase fees x (quantity sold / quantity purchased), so purchase fees are shared between the shares sold and the shares still held. Realised profit or loss = net sale proceeds - cost of the shares sold. Return = realised profit or loss / cost of the shares sold x 100. Break-even selling price = purchase price + purchase fees / quantity purchased + selling fees / quantity sold. Shares still held = quantity purchased - quantity sold; their cost basis is the remaining share of the purchase price and fees. Unrealised profit or loss (only when a current market price is entered) = shares still held x current price - cost basis of the shares still held. This is arithmetic on the figures you enter; it is not investment advice.
Examples
Press "Try an example" in the calculator above to fill in these values.
- Stockname
- ACME
- Qtybought
- 100
- Buyprice
- 50
- Qtysold
- 60
- Sellprice
- 60
- Buyfees
- 10
- Sellfees
- 5
- Current
- 55
- Currency
- USD
Tips
A partial sale splits the purchase fees between the shares sold and the shares kept, so the realised profit reflects only the shares actually sold.
The break-even price includes both sets of fees: selling below it means a loss even when the selling price is above the purchase price.
Frequently Asked Questions
Realised profit or loss is locked in when you sell: it compares what you received for the shares sold, after selling fees, with what those shares cost you including their share of the purchase fees. Unrealised profit or loss is only a paper figure for the shares you still hold, worked out from the current price you enter — it changes if the price changes and only becomes real when you sell.
Because fees have to be recovered too. The break-even price adds your share of the purchase fees and the selling fees to the purchase price, so selling at exactly that price leaves you with neither a profit nor a loss on the shares sold.
No. It never contacts a stock exchange, broker or market-data service. Every price and fee is entered by you, and the currency is only a display label — nothing is converted.