How to Calculate Stock Profit: A Complete Guide for Investors
Knowing exactly how much money you made or lost on a stock trade seems like it should be simple — you bought at one price and sold at another. But the true picture requires accounting for the number of shares, trading commissions, the time you held the position, and ultimately how your return compares to alternative investments. A trade that looks profitable on the surface may underperform when you factor in fees and the opportunity cost of your capital. This guide walks through every element of stock profit calculation so you can evaluate your trades with precision.
The Stock Profit Formula
The core calculation is straightforward, but each component matters:
Total Investment = (Buy Price × Shares) + Buy Commission
Sale Proceeds = (Sell Price × Shares) − Sell Commission
Net Profit = Sale Proceeds − Total Investment
Example: Buy 100 shares at $50, sell at $72, $10 commission each way
Investment = (100 × $50) + $10 = $5,010
Proceeds = (100 × $72) − $10 = $7,190
Net Profit = $7,190 − $5,010 = $2,180
Notice that the $20 in total commissions reduced the profit from $2,200 to $2,180. On a large trade this impact is minimal, but for frequent traders making many small trades, commissions can significantly erode returns. This is one reason the shift to zero-commission brokerages like Robinhood, Fidelity, and Schwab has been transformative for retail investors.
Return on Investment (ROI)
Dollar profit tells you the absolute gain, but ROI tells you the efficiency of your capital. A $2,200 profit on a $5,000 investment (44% ROI) is far more impressive than a $2,200 profit on a $50,000 investment (4.4% ROI), even though the dollar amount is identical.
Example: $2,180 profit on $5,010 investment
ROI = ($2,180 ÷ $5,010) × 100 = 43.51%
Annualized Return
ROI alone does not account for time. A 44% return in one year is excellent. A 44% return over five years is mediocre — it averages about 7.6% per year. Annualized return normalizes your gains to a per-year basis, allowing you to compare investments held for different durations on equal footing.
Example: 43.51% ROI over 365 days
Annualized = (1.4351)^(365/365) − 1 = 43.51%
Same ROI over 730 days (2 years):
Annualized = (1.4351)^(365/730) − 1 = 19.82%
Break-Even Price
The break-even price is the minimum sell price needed to recover your total investment including all commissions. This is especially useful when deciding whether to sell a declining position or hold for recovery.
Example: $5,010 invested, $10 sell commission, 100 shares
Break-Even = ($5,010 + $10) ÷ 100 = $50.20/share
Capital Gains Tax Considerations
Your net profit after taxes depends heavily on how long you held the stock. In the United States, the IRS distinguishes between short-term and long-term capital gains based on a one-year threshold. Stocks held for one year or less are taxed at your ordinary income tax rate (10-37% depending on bracket). Stocks held for more than one year qualify for long-term capital gains rates, which are significantly lower: 0%, 15%, or 20% depending on taxable income.
The impact is substantial. On a $10,000 capital gain, a taxpayer in the 32% bracket would owe $3,200 in short-term tax but only $1,500 in long-term tax — a difference of $1,700. This tax differential is one of the strongest arguments for holding winning positions beyond the one-year mark when possible.
The True Cost of Commissions
While many US brokerages now offer zero-commission trading for stocks and ETFs, commissions still apply in many contexts: options contracts (typically $0.50-$0.65 per contract), international stock exchanges, full-service brokers, and cryptocurrency trades. Even "zero commission" platforms may charge through wider bid-ask spreads or payment for order flow, which creates hidden costs that do not appear as line items but still reduce your effective returns.
For active traders, these costs compound quickly. A trader making 200 round-trip trades per year at $10 per trade spends $4,000 annually on commissions alone. On a $50,000 portfolio, that is an 8% drag on returns before a single trade is profitable or not. This is why commission structure should be a primary consideration when choosing a brokerage, particularly for high-frequency trading strategies.
Dollar-Cost Averaging and Profit Calculation
When you buy shares of the same stock at different times and prices — which is common with regular investment contributions — calculating profit requires determining your average cost basis. If you bought 50 shares at $40, then 50 more at $60, your average cost is $50 per share (total $5,000 ÷ 100 shares), not the simple average of $40 and $60. If you later sell all 100 shares at $70, your profit is ($70 − $50) × 100 = $2,000, not ($70 − $40) × 50 + ($70 − $60) × 50 (which yields the same result, but the average cost method is simpler and is required for mutual funds).
For tax purposes, you can use either the average cost method, FIFO (First In, First Out), or specific identification, depending on the security type and your broker's settings. Specific identification offers the most flexibility for tax optimization, as you can choose to sell higher-cost shares first to minimize taxable gains.