Stock Sell Tax Calculator – Estimate Capital Gains Tax When Selling Stocks | OmniCalculator.Space

Calculate taxes when selling stocks or ETFs with lot-by-lot tracking, FIFO/LIFO selection, and holding period analysis. Model fees, offsets, and export detailed breakdowns. Free educational tool.

Stock Sell Tax Calculator

Estimate your capital gains tax and net proceeds when selling stocks or ETFs. This calculator uses configurable tax rates and allows lot-by-lot tracking, FIFO/LIFO selection, and detailed breakdowns. All calculations are performed locally in your browser.

Stock Sell Tax Calculator

Estimates gains and taxes using the rates you enter. Rules vary by country and account type.

Optional: fees, lots & special rules
Fees and lot selection can change your taxable gain. This tool is an estimate.
Estimated Net Proceeds After Tax
$0.00
Total Proceeds $0.00
Total Cost Basis $0.00
Capital Gain / Loss $0.00
Taxable Gain After Offsets $0.00
Estimated Tax $0.00
Effective Tax Rate 0.0%
Gain Type
Compare scenarios before you sell
Model fees, lots, and tax rates
Export a lot-by-lot summary
Explore investing tools

Lot-by-Lot Breakdown & Timeline

Holding Period Summary

Overall holding period threshold: 12 months

Short-term: 0 shares | Long-term: 0 shares

How It Works

Core Formulas

Total Proceeds:
\( \text{Proceeds} = \text{Shares Sold} \times \text{Sell Price} \)
Cost Basis:
Single average: \( \text{Basis} = \text{Shares Sold} \times \text{Average Buy Price} \)
Lot-by-lot: \( \text{Basis} = \sum (\text{Shares from Lot} \times \text{Lot Buy Price}) \)
Capital Gain:
\( \text{Gain} = \text{Proceeds} - \text{Basis} - \text{Fees} \)
Taxable Gain After Offsets:
\( \text{Taxable Gain} = \max(0, \text{Gain} - \text{Loss Offset}) \)
Estimated Tax:
\( \text{Tax} = \text{Taxable Gain} \times \frac{\text{Rate}}{100} \)

Proceeds represent the total sale value before any deductions. Cost basis is what you originally paid for the shares (including any adjustments). Capital gain (or loss) is the difference between proceeds and basis, minus transaction fees.

Holding period determines whether gains are taxed at short-term or long-term rates. The calculator compares the time between purchase and sale dates against your specified threshold (typically 12 months in many jurisdictions).

Tips to Reduce Taxable Gains

  • Keep detailed records: Track purchase dates, prices, and lot information to optimize your cost basis calculation.
  • Use strategic lot selection: FIFO, LIFO, or highest-cost methods can significantly impact your taxable gain in different market conditions.
  • Monitor holding periods: Waiting beyond the long-term threshold often results in lower tax rates.
  • Account for all fees: Brokerage commissions and regulatory fees reduce your taxable gain.
  • Harvest tax losses: Offsetting gains with available capital losses can reduce your overall tax liability.
  • Consider timing: Spreading sales across tax years may provide flexibility in managing your tax bracket.

Remember: These are general educational concepts. Tax rules vary by jurisdiction and individual circumstances.

Frequently Asked Questions

How do I calculate capital gains tax on stocks?
Capital gains tax is calculated by finding the difference between your sale proceeds and cost basis (what you paid), then applying the appropriate tax rate based on your holding period. Short-term gains (typically held less than 12 months) are usually taxed at higher ordinary income rates, while long-term gains receive preferential treatment.
What's the difference between FIFO and LIFO for stocks?
FIFO (First In, First Out) assumes you sell the oldest shares first, while LIFO (Last In, First Out) assumes you sell the newest shares first. FIFO often results in higher gains in rising markets because older shares typically have lower cost basis. LIFO can minimize short-term gains by selling recently purchased shares first.
What is cost basis in stocks?
Cost basis is the original purchase price of your shares, adjusted for splits, dividends, and other corporate actions. It determines your capital gain or loss when you sell. Accurate cost basis tracking is essential for correct tax reporting and can be calculated as a single average or tracked lot-by-lot.
How do I calculate net proceeds from a stock sale?
Net proceeds equal your total sale price minus brokerage fees, regulatory charges, and estimated taxes. The formula is: Net Proceeds = (Shares × Sell Price) - Fees - Tax. This calculator helps you estimate the actual cash you'll receive after all deductions.
What's the difference between short-term and long-term capital gains?
Short-term capital gains apply to assets held for less than the threshold period (often 12 months) and are typically taxed at higher ordinary income rates. Long-term capital gains apply to assets held longer and usually receive more favorable tax treatment with lower rates.
How does the wash sale rule work?
The wash sale rule (in some jurisdictions) disallows claiming a capital loss if you purchase substantially identical securities within a specific window (often 30 days before or after the sale). The disallowed loss is typically added to the cost basis of the replacement shares. This calculator allows you to model such adjustments for educational purposes.
Can I offset capital gains with losses?
Yes, in many tax systems you can offset capital gains with capital losses from other investments. If your losses exceed your gains, you may be able to carry forward unused losses to future years or offset a limited amount against ordinary income, depending on local rules.
Should I use lot-by-lot or average cost basis?
Lot-by-lot tracking gives you more control and can optimize your tax outcome through strategic lot selection (FIFO, LIFO, highest cost). Average cost basis is simpler but offers less flexibility. For active traders or volatile stocks, lot-by-lot tracking often provides better tax management opportunities.
How do brokerage fees affect my capital gains?
Brokerage commissions, regulatory fees, and other transaction costs are subtracted from your proceeds or added to your cost basis, reducing your taxable capital gain. Always include these fees in your calculations for accurate tax reporting.
Can I export the lot-by-lot breakdown?
Yes, this calculator allows you to export a detailed CSV file containing all lot information, purchase dates, sale allocations, gains/losses, and holding periods. This export can be useful for tax preparation, record-keeping, or importing into tax software.

About This Calculator

The Stock Sell Tax Calculator is developed by OmniCalculator.Space, a comprehensive collection of interactive financial, educational, and practical calculators. This tool is designed for educational purposes to help investors understand the tax implications of selling stocks and ETFs.

All calculations are performed locally in your browser. No data is transmitted to external servers, ensuring complete privacy. The calculator uses configurable tax rates that you specify—it does not incorporate country-specific tax laws or provide personalized tax advice.

Additional Resources

For authoritative information on capital gains taxation and investment record-keeping:

Disclaimer: This calculator is for educational purposes only and provides estimates based on the tax rates you enter. It does not constitute tax, financial, or investment advice. Tax laws vary significantly by country, state, and individual circumstances. Always consult with a qualified tax professional or financial advisor for personalized guidance. OmniCalculator.Space assumes no liability for decisions made based on these calculations.