Stock Profit Calculator
Calculate the gain or loss on a single stock trade — net of buy and sell commissions — and see your annualized return based on how long you held.
How the stock profit calculator works
The calculation is closed-form, no simulation needed. Your total cost is (buy price × shares) + buy commission, and your total proceeds are (sell price × shares) − sell commission. Net profit or loss is proceeds minus cost.
Return percentage is net P/L divided by total cost. Annualized return — only shown if you provide a holding period — scales the return to a per-year rate using (proceeds / cost)^(365 / days) − 1, so a short-hold gain looks proportionally more impressive than the same gain held over years.
Commissions are flat per-trade fees. For percentage-based fees, convert to dollars first (e.g., 0.10% of $5,000 trade = $5).
Frequently asked questions
- How is profit or loss calculated?
- Net P/L = (sell price × shares − sell commission) − (buy price × shares + buy commission). Gross P/L is the same but without commissions. The return percentage is net P/L divided by total cost (including buy commission).
- What is "annualized return" and why does it differ from "return"?
- Return is the raw percentage gain or loss over the holding period. Annualized return scales it to a per-year rate using the formula (1 + total return)^(365 / days) − 1. A 5% return earned in 6 months annualizes to about 10.25%; the same 5% earned in 2 years annualizes to about 2.47%.
- Should I include taxes in this calculator?
- No — this calculator shows pre-tax profit. For capital-gains tax on a sale, use the Capital Gains Calculator (linked below). It handles short-term vs long-term rates and computes after-tax gain.
- What if I had multiple buys at different prices?
- This calculator models a single buy + sell. For dollar-cost-averaging across many purchases, use the DCA Calculator. For a position with reinvested dividends, use the Dividend Reinvestment Calculator.
- Is this financial advice?
- No. Educational purposes only. Real returns depend on taxes, fees not modeled here, slippage, and timing. Consult a licensed advisor before making investment decisions.
Related calculators
Capital Gains Tax Calculator
After-tax gain on a stock sale, with short-term vs long-term rates.
Dividend Calculator
Project portfolio growth with reinvested dividends and contributions.
Compound Interest Calculator
Future value of a portfolio with regular contributions.
Dollar-Cost Averaging Calculator
Regular fixed-amount investing over time.