StockCalc

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 depends on executed prices, quantity, fees, taxes, distributions, corporate actions, currency, and tax-lot rules. A calculator can model selected inputs, but it cannot determine the actual tax liability or guarantee execution prices.

When after-cost profit math matters

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 is not generally a flat percentage of net trading profit. Basis, holding period, account type, losses, wash-sale or similar rules, withholding, and jurisdiction can change the result.

Separate trading arithmetic from tax accounting

Buying 100 shares at $50 and selling at $62 creates a $1,200 gross price gain before fees. Subtracting two $5 commissions gives $1,190 before any tax analysis.

Why a flat tax estimate can differ from liability

Execution costs beyond commissions

Bid-ask spread, slippage, market impact, borrow, financing, and partial fills can change realized profit. The last quoted price is not a guaranteed execution price.

Common mistakes

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

Does the calculator determine my taxes?

No. It applies selected assumptions and cannot replace jurisdiction-specific tax records or advice.

Should fees be included in basis?

Treatment depends on the fee and tax system; broker reporting and local rules should be checked.

Are dividends part of trading profit?

Not automatically. Total-return analysis should include distributions, withholding, and reinvestment under a stated convention.

Can realized profit differ from the calculator?

Yes. Execution prices, slippage, fees, corporate actions, currency, and tax rules can change the result.

Continue learning this topic

Move from this guide into a complete calculator path with related tools and glossary terms.

Open the Returns & Cost Basis hub →

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.