How to Calculate Stock Profit After Fees and Taxes
Gross gain on screen is not the same as dollars you keep after commissions and tax assumptions.
How to Calculate Stock Profit After Fees and Taxes
Updated June 2026 · ~9 min read
Stock profit starts with price change times shares, but commissions on both legs and taxes on realized gains change what you actually keep. This guide walks through gross profit, net profit after costs, and return on total cash deployed—with illustrative numbers only. For educational purposes only; not tax or investment advice.
When after-cost profit math matters
- Round-trip trades: you want one number for P&L after buy and sell commissions.
- Tax planning sketches: you model a flat tax rate on gains before year-end decisions.
- Comparing brokers: you see how fee tiers change break-even on small positions.
- Not suitability: outputs do not tell you whether to trade—only arithmetic.
The formula
Gross profit = (Sell price − Buy price) × Shares Net profit ≈ Gross profit − Buy commission − Sell commission − Tax on gain (if modeled) Return % ≈ Net profit ÷ (Buy price × Shares + Buy commission) × 100%
Tax treatment varies by country, holding period, and account type. Use a rate you supply; StockCalc does not choose it for you.
Worked example (illustrative)
Trade setup
- Buy 100 shares at $50.00; sell at $62.00.
- Buy commission $5; sell commission $5.
- Modeled tax rate on gain 15% (illustrative only).
Step-by-step
- Gross profit = (62 − 50) × 100 = $1,200.
- After commissions: $1,200 − $5 − $5 = $1,190.
- Tax on gain (simplified): $1,190 × 15% = $178.50 → net ≈ $1,011.50.
- Total cost basis ≈ $5,000 + $5 = $5,005 → return ≈ 20.2% on cash deployed.
Reproduce with the stock profit calculator. Pair with commission and ROI tools for related checks.
Common mistakes
- Ignoring commissions on both buy and sell when sizing small trades.
- Using gross return while comparing to a benchmark quoted net of fees.
- Applying a flat tax rate without checking short-term vs long-term rules.
- Forgetting that losses and wash-sale rules can change taxable outcomes.
- Treating calculator output as guaranteed fill prices (slippage not modeled).
Try the calculator
Use the interactive calculator to plug in your numbers and see results instantly—without redoing the math by hand.
Open stock profit calculator →FAQ
Gross vs net profit?
Gross is price change × shares; net subtracts commissions and any tax rate you enter.
Does StockCalc file taxes for me?
No—it applies the rate you type for illustration only.
Are dividends included?
This guide focuses on trading P&L; use a total-return tool for dividends.
Is this trading advice?
No—educational arithmetic only.
Related calculators
Educational Disclaimer
This article is for educational and informational purposes only and should not be considered investment, financial, tax, or legal advice. Market information may change over time, and readers should verify important details independently before making financial decisions.