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.

Partial sales are supported, including fractional quantities. Purchase fees are shared between the shares sold and the shares still held. Currency is a display label only — amounts are never converted. Nothing here is investment advice.

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