Tested tool guide
Tested browser tools
Checked August 16, 2026
What Stock Profit Calculator does, with a checked example
This calculator works out the real result of a stock trade: enter the price you paid per share, the price you sold at, how many shares, and the commissions charged on both legs, and it returns your net profit or loss in dollars and as a percentage of what you actually invested. The arithmetic is simple: price difference times shares, minus fees. But the part that most often surprises people is that commissions apply on both sides of the trade, so two small flat fees can turn a marginal gain into a loss, particularly on small positions.
Worked example
A concrete input and expected output from the current implementation.
Input
Buy 100 shares of XYZ at $50.00, sell all 100 at $62.50, commission $10.00 on each side of the trade.
->
Expected output
Net profit: $1,230.00. Total cost: $5,010.00 ($5,000.00 purchase plus $10.00 buy commission). Net proceeds: $6,240.00 ($6,250.00 sale minus $10.00 sell commission). Return: 24.55% on invested capital.
The gross gain is $12.50 per share on 100 shares, or $1,250.00, and the two $10.00 commissions reduce that to $1,230.00. Dividing by the $5,010.00 actually invested gives 24.55%, slightly less than the stock's 25% price move.