Stock Profit Calculator: How to Calculate Your Returns in 2026
Quick Answer
To calculate stock profit, subtract your total buy cost (shares × buy price + commissions) from your total sell proceeds (shares × sell price − commissions). Divide net profit by total cost to get ROI. Short-term gains are taxed as ordinary income; long-term gains at 0–20%.
Why You Need to Calculate Stock Profit Correctly
Most investors track whether their portfolio is “up” or “down,” but few calculate the three numbers that actually matter: gross profit, net profit after costs, and annualized ROI. Getting these wrong leads to poor trade sizing, surprise tax bills, and a distorted picture of your actual performance.
According to the 2023 Dalbar Quantitative Analysis of Investor Behavior (QAIB) study, the average equity fund investor earned just 6.81% annually over the prior 20 years, compared to 9.65% for the S&P 500over the same period. The gap is almost entirely behavioral — driven by mistiming trades and misreading returns. Precise profit calculation is the foundation of better decisions.
The Core Formulas
Gross Profit
Gross Profit = (Sell Price − Buy Price) × Number of Shares
This is your raw gain before any costs. If you bought 200 shares at $45 and sold at $58, your gross profit is ($58 − $45) × 200 = $2,600.
Net Profit
Net Profit = Gross Profit − Buy Commission − Sell Commission − Taxes
Net profit is what you actually keep. Commissions matter most for smaller trades. On a $1,000 trade, a $10 round-trip commission is a 1% hurdle before you even break even.
Return on Investment (ROI)
ROI = (Net Profit ÷ Total Cost) × 100
Total cost includes the purchase price of all shares plus the buy commission. ROI lets you compare a trade that made $200 on $1,000 invested (20% ROI) against one that made $2,000 on $40,000 invested (5% ROI). Raw dollar amounts are misleading without this context.
Worked Example: A Complete Stock Trade
Here is a full calculation for a 100-share trade, showing how each cost layer reduces your take-home profit.
| Input | Value |
|---|---|
| Shares Purchased | 100 |
| Buy Price per Share | $52.00 |
| Sell Price per Share | $67.50 |
| Buy Commission | $0.00 (commission-free broker) |
| Sell Commission | $0.00 |
| Holding Period | 14 months (long-term) |
| Federal Tax Rate (long-term) | 15% |
| Metric | Calculation | Result |
|---|---|---|
| Total Cost | 100 × $52.00 | $5,200.00 |
| Total Proceeds | 100 × $67.50 | $6,750.00 |
| Gross Profit | $6,750 − $5,200 | $1,550.00 |
| Tax Owed (15%) | $1,550 × 0.15 | $232.50 |
| Net Profit (after tax) | $1,550 − $232.50 | $1,317.50 |
| Net ROI | $1,317.50 ÷ $5,200 × 100 | 25.34% |
Use the Stock Profit Calculator to run these numbers instantly without manual arithmetic.
5 Metrics to Know After Every Stock Trade
Before closing out any position, confirm you know all five of these figures.
- Gross Profit / Loss — the raw gain or loss before any deductions. The starting point for everything else.
- Net Profit / Loss — gross profit minus commissions and taxes. The number that actually hits your account.
- ROI (%) — net profit divided by total cost. Normalizes gains across trades of different sizes.
- Annualized ROI — adjusts ROI for time held. A 20% gain in 6 months is a 40% annualized return; in 2 years it is only 9.5% per year. Critical for fair comparisons.
- Tax Owed — whether the gain is short-term or long-term determines the rate. Knowing this before you sell lets you decide whether waiting a few more weeks is worth the lower tax rate.
Capital Gains Tax: Short-Term vs Long-Term
The single biggest lever on your net profit is how long you hold a position. The IRS treats gains very differently based on holding period.
Short-Term Capital Gains (Held Under 1 Year)
Short-term gains are taxed as ordinary income at your marginal federal rate. In 2026, the top marginal rate is 37% for individuals earning over $626,350 (IRS Revenue Procedure 2025-28). For someone in the 22% bracket, a $10,000 short-term gain costs $2,200 in federal tax.
Long-Term Capital Gains (Held 1+ Years)
The IRS long-term capital gains rates for 2026 are 0%, 15%, or 20% based on taxable income (IRS Publication 550, 2025 edition):
| 2026 Taxable Income (Single Filer) | Long-Term Rate |
|---|---|
| $0 – $47,025 | 0% |
| $47,026 – $518,900 | 15% |
| $518,901+ | 20% |
High earners also owe the 3.8% Net Investment Income Tax (NIIT) on investment income above $200,000 (single) or $250,000 (married filing jointly), per IRS Section 1411.
The tax savings from qualifying for long-term treatment can be dramatic. On a $20,000 gain, moving from the 32% short-term rate to the 15% long-term rate saves $3,400.
Cost Basis Methods Explained
If you bought shares in multiple lots at different prices, you need a method to determine which shares you are selling. The IRS allows three main approaches.
FIFO (First In, First Out)
The default for most brokers. The oldest shares are sold first. If your earliest purchases had the lowest cost basis, FIFO maximizes your taxable gain. But if early lots have already hit the one-year mark, FIFO also guarantees long-term treatment.
Specific Identification
You tell your broker exactly which tax lot to sell. This is the most powerful method — you can cherry-pick lots with the highest cost basis (minimizing gain) or the longest holding period (securing long-term rates). FINRA notes that specific identification requires you to instruct your broker before the trade settles, not after (FINRA Investor Bulletin, 2024).
Average Cost
Averages the cost basis across all shares in a position. Commonly used for mutual funds. Simple to track but eliminates the flexibility of specific identification. Note that average cost is not available for individual stocks held in most standard brokerage accounts — it applies mainly to mutual fund shares.
How the S&P 500 Benchmark Changes Everything
Gross profit is only half the story. The other half is whether your trade beat what you could have earned by doing nothing.
The S&P 500 has returned an average of 10.5% annuallyover the past 50 years, according to data from Standard & Poor's (2025 Fact Sheet). After 3% average inflation, the real return is approximately 7.5%.
If you earned a 6% annualized return on an actively managed position while the index returned 10.5%, you underperformed by 4.5 percentage points — even if you made money in absolute terms. The SEC's Office of Investor Education encourages retail investors to benchmark individual trade returns against a relevant index before concluding they are “beating the market” (SEC Investor Bulletin: Index Funds, 2023).
Common Stock Profit Calculation Mistakes
Ignoring Commissions on Small Trades
Even at $0 commissions for stocks, options trades carry per-contract fees. A $0.65-per-contract fee on 10 contracts is $6.50 each way — $13 round-trip. On a $500 options position, that is a 2.6% headwind before the trade even moves.
Forgetting State Taxes
Federal rates are only part of the bill. California taxes capital gains as ordinary income at rates up to 13.3%. New York adds up to 10.9%. Always factor in your state rate when estimating net profit. Our Capital Gains Tax Calculator includes state-level estimates.
Using Gross Profit for Performance Comparison
Comparing raw dollar gains across trades of different sizes is meaningless. A $500 gain on $2,000 invested (25% ROI) beats a $1,000 gain on $20,000 invested (5% ROI) on a capital-efficiency basis. Always normalize to ROI.
Ignoring Wash Sale Rules
If you sell a stock at a loss and repurchase the same or substantially identical security within 30 days before or after the sale, the IRS disallows the loss under wash sale rules (IRS Publication 550). Disallowed losses get added to the cost basis of the replacement shares, deferring — not eliminating — the tax benefit.
Calculate your exact stock profit and tax owed
Use our free Stock Profit Calculator →Also useful: Capital Gains Tax Calculator · ROI Calculator · Investment Calculator
Related Guides and Tools
Understanding stock profit is part of a broader picture of investment math. These guides go deeper on related topics:
- How to Calculate ROI: A Complete Guide — covers all asset types, not just stocks.
- Capital Gains Tax 2026: Rates, Rules, and How to Minimize Your Bill
- How to Calculate Stock Profit: Step-by-Step — a shorter, formula-focused companion piece.
- Compound Interest Explained: How Your Money Grows Over Time
- How to Invest Money: A Beginner's Guide
Frequently Asked Questions
How do I calculate profit on a stock trade?
Gross profit equals (Sell Price − Buy Price) multiplied by the number of shares. Net profit subtracts commissions on both legs and any capital gains tax owed. For example: buying 100 shares at $50 and selling at $65 gives a $1,500 gross profit. After a $10 round-trip commission, net pre-tax profit is $1,490.
What is the difference between short-term and long-term capital gains tax?
Short-term capital gains apply to stocks held under one year and are taxed as ordinary income — up to 37% in 2026. Long-term gains on stocks held over one year are taxed at 0%, 15%, or 20% depending on your taxable income. Holding an investment for just one extra day can meaningfully cut your tax bill.
What is ROI on a stock trade?
Return on investment (ROI) is net profit divided by total cost, expressed as a percentage. If you spent $5,000 buying stock and netted $750 after commissions, your ROI is 15%. ROI lets you compare trades of different sizes on equal footing and is more meaningful than raw dollar profit alone.
What is cost basis and why does it matter?
Cost basis is what you paid for shares, including commissions. It determines your taxable gain. If you bought shares in multiple lots at different prices, you can use FIFO (first in, first out), specific identification, or average cost to choose which shares you are selling — potentially reducing your tax bill significantly.
How do commissions affect stock profit calculations?
Commissions reduce your net profit on both the buy and the sell leg. Many major brokers now offer $0 commissions on US stock trades. However, options trades typically still carry per-contract fees of $0.50 to $0.65. Always factor total round-trip costs into your profit calculation before entering any trade.
What does the average investor actually earn in the stock market?
According to the 2023 Dalbar QAIB study, the average equity fund investor earned just 6.81% annually over the prior 20 years versus 9.65% for the S&P 500. The gap is driven by poor timing, emotional selling, and chasing past performance. A stock profit calculator helps you measure actual results objectively.