Stock Profit Calculator
Calculate your stock trade profit after commissions and capital gains tax. Compare your return against the S&P 500 benchmark.
About This Tool
Knowing whether a stock trade was actually profitable requires more than subtracting the buy price from the sell price. Commissions, fees, and taxes all eat into your returns, and the true bottom line can look very different from the headline gain. This stock profit calculator accounts for all of those factors to give you the complete picture: gross profit, total fees, taxable gain, tax liability, and net profit after everything.
The calculator takes six core inputs: buy price per share, sell price per share, number of shares, buy-side commission, sell-side commission, and capital gains tax rate. For the tax rate, the default is 15%, which corresponds to the US long-term capital gains rate for most income brackets. Short-term gains (held less than one year) are taxed as ordinary income, which can range from 10% to 37%. Adjust the slider to match your situation.
The return on investment (ROI) is calculated as net profit divided by total cost (including commissions), expressed as a percentage. This gives you the true return on the capital you deployed, not just the price appreciation. A stock that rises 20% but costs you 2% in commissions and 15% in taxes yields a very different ROI than the raw price movement suggests.
For trades with a known holding period, the calculator also computes the annualized return. This allows you to compare investments held for different durations on an equal footing. A 30% gain over 3 years is an annualized return of about 9.1%, while a 15% gain over 6 months annualizes to roughly 32.3%. Annualized returns are the standard way to compare performance across different time horizons.
Finally, the calculator compares your actual return against a passive S&P 500 investment over the same period. Using the long-term average annual return of 10.5%, it shows what the same invested capital would have returned if you had simply bought an index fund. This comparison is the ultimate reality check -- it tells you whether your active stock picking beat the simplest passive strategy.
How to Use
-
1
Enter trade details
Input the buy price per share, sell price per share, and number of shares traded.
-
2
Add commissions and tax rate
Enter buy and sell commissions (many brokers now charge $0). Adjust the capital gains tax slider to match your tax bracket and holding period.
-
3
Optional: enter holding period
Enter the number of months you held the stock to see annualized returns and S&P 500 comparison.
-
4
Review your results
See gross profit, net profit, ROI, tax impact, and how your trade compares to the S&P 500 benchmark.
Where Does This Data Come From?
Gross profit is calculated as: (Sell Price - Buy Price) * Shares. Total fees equal Buy Commission + Sell Commission. Taxable gain equals Gross Profit - Total Fees (losses are not taxed). Tax amount equals Taxable Gain * Tax Rate (only on positive gains). Net profit equals Gross Profit - Total Fees - Tax Amount.
ROI is calculated as: Net Profit / Total Cost * 100, where Total Cost = (Buy Price * Shares) + Buy Commission. Annualized ROI uses the formula: ((1 + ROI/100)^(12/months) - 1) * 100. The S&P 500 comparison uses a 10.5% annual average return (the long-term historical average including dividends) compounded over the holding period: S&P Profit = Total Cost * ((1 + 0.105)^(months/12) - 1). All calculations are performed in your browser.