Capital Gains Tax

Selling stocks, real estate, or other investments? Understanding your capital gains tax liability before you sell can save you thousands. Our free Capital Gains Tax Calculator instantly estimates your tax liability on any investment sale, accounting for holding period, income level, and special exclusions. Whether you're planning to sell stocks after years of growth, flipping cryptocurrency, or selling your home, this tool helps you understand the tax consequences and timing strategies. Calculate both short-term and long-term capital gains, understand tax-loss harvesting opportunities, and make informed decisions about when to sell. With 2024 tax rates and all major exclusions built-in, you'll know exactly what to expect come tax season.

What is Capital Gains Tax?

A Capital Gains Tax Calculator estimates the taxes owed when you sell an asset for more than you paid. Capital gains tax applies to profits from selling stocks, bonds, real estate, cryptocurrency, collectibles, and other capital assets. The calculator accounts for holding period (short-term vs long-term), your income tax bracket, special exclusions (like the home sale exclusion), and other factors that affect your tax bill. It uses current IRS tax rates to provide estimates for federal taxes, and can also factor in the Net Investment Income Tax (NIIT) for high-income earners. The tool helps investors and homeowners understand tax implications before selling, plan timing strategies for optimal tax outcomes, and evaluate whether tax-loss harvesting makes sense.

Key features

Short vs Long-Term Calculation - Automatically determines holding period and applies correct tax rates. Multiple Asset Types - Support for stocks, real estate, crypto, collectibles, and more. Income-Based Rates - Applies 0%, 15%, or 20% long-term rates based on your income level. Home Sale Exclusion - Calculates primary residence exclusion up to $250k/$500k. Tax-Loss Scenarios - Shows how losses offset gains. Wash Sale Warning - Alerts about wash sale rules. Depreciation Recapture - Handles real estate depreciation for investment properties. NIIT Calculation - Includes 3.8% Net Investment Income Tax for high earners. State Tax Info - Notes state capital gains rates where applicable. Multi-Year Planning - Carry forward loss calculations. Step-Up Basis - Accounts for inherited property basis adjustments. 1031 Exchange - Notes deferral options for real estate. Detailed Reports - Shows calculation breakdown and tax savings strategies.

How it works

Enter your investment information: Purchase price and date (establishing cost basis and holding period), Sale price and date, Any reinvested dividends or capital improvements, Selling costs (commissions, fees), Your filing status and estimated taxable income. The calculator: Determines if gain is short-term (held 1 year or less) or long-term (held over 1 year), Calculates total capital gain amount, Applies appropriate tax rate: Short-term: your ordinary income tax bracket (10%-37%). Long-term: 0%, 15%, or 20% based on income, Checks for exclusions (primary residence, QSBS), Adds depreciation recapture for real estate (25%), Includes 3.8% NIIT if applicable based on MAGI, Accounts for loss carryforwards and current year losses, Calculates final estimated tax liability. Results show: Total capital gain, Short-term vs long-term breakdown, Tax owed by bracket, Effective tax rate on gains, Comparison of different scenarios (e.g., hold longer for lower rates).

Common use cases

Stock Investors: Calculate taxes before selling appreciated stocks. Compare holding for 12+ months vs selling now. Plan around tax-loss harvesting opportunities. Coordinate with year-end tax planning. Real Estate Sellers: Determine if you qualify for home sale exclusion ($250k/$500k). Calculate tax on investment property sales. Evaluate 1031 exchange benefits vs paying tax now. Account for depreciation recapture on rental properties. Cryptocurrency Traders: Calculate taxes on crypto-to-crypto trades (taxable events). Track cost basis across multiple exchanges. Plan for year-end tax payments on trading profits. Understand wash sale implications (doesn't apply to crypto currently). Retirement Planners: Strategize which assets to sell first in retirement. Balance withdrawals from taxable vs tax-deferred accounts. Minimize taxes on Required Minimum Distributions (RMDs). Executors and Heirs: Calculate stepped-up basis on inherited assets. Plan estate tax strategies. Determine best timing for selling inherited property. Day Traders: Track short-term gains and ordinary income rates. Plan estimated quarterly tax payments. Strategies to minimize tax drag on frequent trading. Options Traders: Covered call strategies and assignment tax implications. Options expiration and exercise tax treatment. Wash sale considerations on options rolls.

Why use Capital Gains Tax

Tax estimates before selling let you know the true after-tax proceeds, helps timing decisions (e.g., wait 2 more months for long-term rates), Comparison tools show tax cost of selling now vs later. Planning power includes coordination with tax-loss harvesting strategies, integration with overall financial plan, identification of tax-efficient giving strategies (donating appreciated stock), avoidance of surprises including no unexpected tax bills, proper estimated payment planning, and avoiding common mistakes. Optimization opportunities include bunching gains strategically across tax years, using lower-income years for Roth conversions, maximizing 0% long-term rate opportunities. Record-keeping assists with cost basis tracking and documentation for IRS. Professional-level insights include sophisticated tax scenarios normally requiring CPA consultation, educational information about tax law, updates for 2025-2026 rates and rules.

Who should use this tool

Individual Investors holding stocks, bonds, ETFs, or mutual funds. Homeowners planning to sell primary residence. Real Estate Investors with rental properties or investment property. Cryptocurrency holders and traders with Bitcoin, Ethereum, altcoins. Small Business Owners selling business assets. Retirees managing portfolio withdrawals. High-Income Earners subject to NIIT (3.8% additional tax). Tax Professionals providing client estimates. Financial Planners incorporating tax projections. Executors settling estates. Day Traders with frequent transactions. RSU/Stock Option recipients from employers. Inheritance recipients with stepped-up basis questions. Charitable donors considering appreciated securities.

How to get started

Using the calculator takes just a few minutes. First gather records including purchase confirmations showing cost basis, statements showing any reinvested dividends, receipts for capital improvements (real estate), and sale documents or estimated sale price. Then input details: Enter original purchase price and date, Add any adjustments to basis, Enter expected sale price and date, Select your tax filing status, Enter estimated taxable income for the year. Finally review results: View total estimated tax liability, See breakdown by type (short vs long-term), Check effective tax rate, Explore strategies to reduce tax. For complex situations like multi-year planning or 1031 exchanges, consult a tax professional with your calculator results.

Best practices

Hold Period Strategy: Wait for long-term rates when possible - difference of 17-22% in tax rates. Consider 12-month holding period before major sales. Timing Strategies: Sell in lower-income years to qualify for 0% rate. Bunch gains if expecting lower income next year. Harvest losses before year-end to offset gains. Record Keeping: Save all purchase confirmations indefinitely. Track reinvested dividends - they increase basis. Document home improvements with receipts. Use specific identification when selling stock lots. Tax-Loss Harvesting: Review portfolio in November/December. Harvest losses while maintaining market exposure (ETF swaps). Watch wash sale rules on repurchases. Consider tax-managed funds for ongoing efficiency. Advanced Strategies: Qualified Opportunity Zone investments defer taxes. Charitable giving of appreciated securities. Installment sales to spread gains across years. Like-kind exchanges (1031) for real estate. Donor-advised funds for charitable bunching. Tools for Success: Use brokerage cost basis tracking. Check 1099-B accuracy each year. Maintain spreadsheet of all asset purchases. Review prior year returns for loss carryforwards.

Limitations to keep in mind

The calculator provides estimates for federal capital gains tax planning and education. It does not constitute tax advice and cannot replace consultation with a qualified tax professional. Limitations include: State capital gains taxes not calculated (varies by state, up to 13.3% in CA), Alternative Minimum Tax (AMT) considerations not fully modeled, Complex business sale structures beyond scope, Estate tax implications not addressed, International tax treaties not covered, Special situations like QSBS may require additional analysis. For investment decisions involving significant amounts, consult a CPA, EA, or tax attorney. Tax laws change frequently - verify current rates and rules with IRS publications.

Frequently asked questions

What is capital gains tax and how is it calculated?

Capital Gains Tax is levied on the profit from selling an asset at a higher price than you paid. The basic formula is: Capital Gain = Selling Price - Cost Basis (purchase price). Type depends on holding period: Short-term: held 1 year or less - taxed as ordinary income (10%-37% in 2024). Long-term: held over 1 year - preferential rates (0%, 15%, or 20%). Example: You bought stock for $10,000 and sold for $15,000. Your capital gain is $5,000. If held 14 months (long-term): at 15% bracket, you'd owe $750 in tax. If held 10 months (short-term): taxed at your ordinary rate, potentially $1,100-$1,850. Netting Rules: Short-term gains and losses are netted first, Long-term gains and losses are netted second, Then combined, Losses offset gains, Up to $3,000 net capital loss can offset ordinary income annually, Unused losses carry forward indefinitely. Additional Taxes: Net Investment Income Tax (NIIT): 3.8% on investment income if AGI exceeds $200,000 (single) or $250,000 (married).

What are the 2024 long-term capital gains tax rates?

2024 Long-Term Capital Gains Tax Rates depend on your taxable income: 0% Rate (tax-free gains): Single: Up to $47,025, Married Filing Jointly: Up to $94,050, Head of Household: Up to $63,000. 15% Rate (most common): Single: $47,026 - $518,900, Married Filing Jointly: $94,051 - $583,750, Head of Household: $63,001 - $551,350. 20% Rate (highest): Single: Over $518,900, Married Filing Jointly: Over $583,750, Head of Household: Over $551,350. Examples: Single with $60,000 taxable income: 15% on gains, Married with $150,000 combined: 15% bracket, High earners over $500k: 20% bracket. Short-term gains are always taxed as ordinary income at 10%-37%. Strategy: Holding investments over 1 year can save significantly. A $50,000 gain held 13 months at 15% = $7,500 tax. Same gain held 11 months (33% bracket) = $16,500 tax. Holding longer saved $9,000.

How do I calculate cost basis for investments?

Cost Basis is what you paid for an asset and determines your taxable gain. Original Cost Basis: Purchase price + Brokerage fees/commissions + Other acquisition costs. Adjusted Cost Basis includes: Plus: Capital improvements (for real estate), Reinvested dividends (stock purchases), Plus: Legal/professional fees related to purchase. Minus: Depreciation taken (real estate), Return of capital distributions. Example - Stock: Buy 100 shares at $50 = $5,000 + $10 commission = $5,010 basis. Sell at $75 = $7,500 - $5,010 = $2,490 gain. Example - Home: Purchase price: $300,000, Additions: $50,000 (kitchen, deck), Selling costs: $20,000 (commission, fees), Total basis: $370,000. Sell for $500,000, Gain: $130,000. Methods for Stock: FIFO (First In, First Out) - oldest shares sold first, Specific Identification - choose which shares to sell, Average Cost - for mutual funds only. Record Keeping: Save all purchase confirmations, Track reinvested dividends, Document improvements (homes), Keep records for 7+ years after sale. Brokerages now track basis and report to IRS on Form 1099-B.

What is tax-loss harvesting and how does it work?

Tax-Loss Harvesting is selling losing investments to offset capital gains and reduce taxes. How it works: Sell investments at a loss, Losses offset gains dollar-for-dollar, Up to $3,000 can offset ordinary income, Unused losses carry forward indefinitely. Wash Sale Rule: Cannot claim loss if you buy same/substantially identical security within 30 days before or after sale. Maintains position but defers loss. Example: You have $20,000 in gains and $8,000 in losses. Harvest the $8,000 loss: Offset $8,000 of gains, Net gain: $12,000, Tax savings: approximately $1,800-$2,400 (at 15-20% rate). Strategic Timing: December: Harvest losses to offset year gains, January: Rebuy different but similar investments, Avoid wash sale by waiting 31 days or buying different fund. Annual Limits: Unlimited offset against capital gains, Max $3,000 against ordinary income, Carry forward unused losses. ETF Swaps: Sell S&P 500 ETF at loss, Buy Total Market ETF (not substantially identical), Maintain market exposure, Claim loss immediately. Planning Tips: Review portfolio in November/December, Harvest losses throughout the year, Don't let tax tail wag investment dog, Consider transaction costs.

What is the home sale capital gains exclusion?

The Home Sale Exclusion lets you avoid capital gains tax on qualifying home sales up to: $250,000 for single filers, $500,000 for married filing jointly. Requirements (must meet ALL): 1) Ownership test: Owned the home at least 2 years, 2) Use test: Lived in home as primary residence at least 2 of last 5 years, 3) Exclusion limit: Haven't used exclusion on another home in past 2 years. The 2 years don't need to be consecutive. Example: Single person buys home for $300,000, Sells for $550,000, Gain: $250,000, Tax owed: $0 (fully excluded). If sold for $600,000: Gain: $300,000, Excluded: $250,000, Taxable gain: $50,000. Partial Exclusion allowed if selling due to: Work relocation (new job 50+ miles away), Health reasons (doctor recommendation), Unforeseen circumstances (divorce, job loss, disaster). Precise calculation based on time lived in home. Exceptions and Limitations: Not for investment property or second homes, Doesn't apply to depreciation recapture on rental use, Must prorate for business use of home, Can't use for house flipping. Military Exception: Suspended use test during qualified official extended duty.

How are different types of assets taxed?

Capital gains tax varies by asset type: Stocks and Bonds: Short-term: Ordinary income rates (10%-37%), Long-term: 0%, 15%, or 20% based on income. May owe 3.8% NIIT if high income. Real Estate: Primary residence: Up to $250k/$500k exclusion, Investment property: Regular capital gains + depreciation recapture (25% rate), Depreciation recapture taxed at 25% maximum. Cryptocurrency: Taxed as property (capital gains), Each sale/trade is taxable event (including crypto-to-crypto), Mining/airdrops: Ordinary income at fair market value, Short-term: 10-37%, Long-term: 0%/15%/20%. Collectibles (art, antiques, coins, precious metals): Long-term rate: 28% maximum (higher than standard), Short-term: ordinary rates, No preferential 0% or 15% rates. Qualified Small Business Stock (QSBS): Section 1202 exclusion: Up to $10 million or 10x basis, Must hold 5+ years, 0% federal tax on qualifying gains. Crypto Staking: Rewards taxed as ordinary income when received, Selling rewards triggers capital gains. RSUs and Stock Options: RSUs: Ordinary income at vest, then capital gains on appreciation after, ISOs: No tax at exercise, capital gains at sale if held 1+ year after exercise and 2+ years after grant.

Related tools