How to use the Stock Profit Calculator
- Enter the number of shares bought and sold.
- Enter the purchase price per share.
- Enter the sale price per share.
- Enter any buying fees or commissions and any selling fees or commissions.
- Read total cost basis, total proceeds, profit or loss, per-share profit, and return on invested amount.
Stock trade profit formula
Where:
- = number of shares bought and sold
- = price paid per share
- = price received per share
- = commissions or fees paid when buying
- = commissions or fees paid when selling
Show as plain text
Total purchase cost (basis) = shares × purchase price + buying fees Total sale proceeds = shares × sale price − selling fees Profit or loss = total proceeds − total basis Profit or loss per share = profit or loss ÷ shares Return on amount invested = profit or loss ÷ total basis × 100
Add buying fees to the share purchase cost to get the total basis. Subtract selling fees from the sale proceeds to get total proceeds. Profit or loss is proceeds minus basis. Return is profit or loss as a percentage of the amount invested.
Assumptions and limitations
- All share counts, prices, and fees are supplied by the visitor; no market data is used.
- The same number of shares is assumed to be bought and sold. Partial sales or multiple lots are not modeled.
- Results are pre-tax and exclude dividends, taxes, and other transaction costs beyond the entered fees. Not investment advice.
Example: 100 shares bought at $50, sold at $65, $5 buying fee and $5 selling fee
- Total purchase cost: 100 × $50 + $5 = $5,005.
- Total sale proceeds: 100 × $65 − $5 = $6,495.
- Pre-tax profit: $6,495 − $5,005 = $1,490.
- Profit per share: $1,490 ÷ 100 = $14.90.
- Return: $1,490 ÷ $5,005 × 100 = 29.77%.
When to use the Stock Profit Calculator
- Working out the pre-tax profit or loss on a completed or planned stock sale.
- Comparing how buying and selling fees change the net result.
- Seeing profit per share and return on the amount invested.
Stock Profit Calculator FAQs
Pre-tax?
Yes.
What if I sell for less than I paid?
The result is a negative profit (a loss). Total proceeds will be less than total basis, and the return percentage will be negative.
Can I use this for multiple purchases at different prices?
No. This calculator models a single purchase price and a single sale price. Multiple lots or average cost are not supported.
How this calculator was built and tested is explained in our methodology. Spotted a problem? Let us know.