Capital Gains Tax Calculator

Capital Gains Tax Calculator

Calculate capital gains tax on investments and asset sales

Capital improvements that increase the asset's basis (real estate improvements, etc.)

Broker fees, commissions, legal fees, and other costs of sale

Your total taxable income for the year (excluding this capital gain)

Capital Gains Tax Calculator: Complete Investment Guide

Capital gains tax is the tax on profit from selling investments, real estate, or other capital assets.The tax rate depends on how long you held the asset (holding period) and your income level. Understanding capital gains taxation is crucial for investment planning, retirement strategies, and maximizing after-tax returns.

Quick Answer

To calculate capital gains tax: Subtract your purchase price (adjusted basis) from sale price to get the gain. If held over 1 year, it's taxed at preferential rates (0%, 15%, or 20%). If held 1 year or less, it's taxed as ordinary income (up to 37%). High earners may pay an additional 3.8% Net Investment Income Tax.

Was this helpful?Feedback

Current Capital Gains Tax Rates

0%, 15%, or 20%

Long-term capital gains tax rates (assets held over 1 year)

Tax Rate Classifications:

Long-Term Capital Gains (>1 Year)

Assets held for more than one year qualify for preferential tax rates based on income.

0% Rate: Single ≤$47,025, MFJ ≤$94,050
15% Rate: Single $47,026-$518,900, MFJ $94,051-$583,750
20% Rate: Single > $518,900, MFJ > $583,750

Short-Term Capital Gains (≤1 Year)

Assets held for one year or less are taxed as ordinary income at rates up to 37%. No preferential treatment - same rates as wages, salaries, and business income.

Net Investment Income Tax (NIIT)

Additional 3.8% tax on investment income for high earners. Applies when modified AGI exceeds: Single $200,000, Married Filing Jointly $250,000, Married Filing Separately $125,000.

Essential Capital Gains Concepts

Adjusted Basis Calculation

Your basis determines the actual taxable gain or loss on the sale.

Adjusted Basis = Purchase Price + Improvements + Transaction Costs
Includes: Purchase price, capital improvements, acquisition costs
For Real Estate: Add renovations, additions, major repairs

Holding Period Rules

The exact holding period determines your tax treatment.

Long-term: > 365 days | Short-term: ≤365 days
Calculation: From day after purchase to day of sale
Special Rules: Inherited assets get stepped-up basis

Tax Loss Harvesting

Strategic use of capital losses to reduce tax liability.

Losses offset gains + $3,000 ordinary income annually
Strategy: Realize losses to offset gains in same year
Carryover: Unused losses carry forward indefinitely

Capital Gains by Asset Type

Stocks & Securities

Individual Stocks

Standard capital gains rules apply. Track purchase date and price for each lot.

Mutual Funds & ETFs

May generate capital gains distributions even if you don't sell shares.

Options & Derivatives

Complex rules apply. Most options are short-term regardless of holding period.

Cryptocurrency

Treated as property for tax purposes. Each transaction is a taxable event.

Real Estate & Property

Primary Residence

Up to $250,000 ($500,000 married) exclusion if lived in 2 of last 5 years.

Investment Property

Subject to depreciation recapture at 25% plus capital gains on appreciation.

1031 Exchanges

Like-kind exchanges can defer capital gains tax on investment properties.

Commercial Real Estate

Complex depreciation recapture rules and potential Section 1250 treatment.

Tax Optimization Strategies

Timing Strategies

Hold for Long-Term Treatment

Wait 366+ days to qualify for preferential capital gains rates instead of ordinary income rates.

Tax Year Management

Time sales across tax years to manage income levels and stay within favorable rate brackets.

Loss Harvesting

Realize losses to offset gains, reducing overall tax liability. Losses carry forward indefinitely.

Advanced Strategies

Asset Location

Hold tax-inefficient investments in tax-advantaged accounts, efficient ones in taxable accounts.

Charitable Giving

Donate appreciated assets to avoid capital gains tax while receiving full fair market value deduction.

Installment Sales

Spread capital gains over multiple years to stay in lower tax brackets and manage NIIT exposure.

Special Situations and Rules

Primary Residence Exclusion

Homeowners can exclude up to $250,000 ($500,000 if married filing jointly) of capital gains from the sale of their primary residence.

Requirements: Owned and lived in home 2 of last 5 years
Frequency: Can use exclusion once every 2 years
Partial Exclusion: Available for work, health, or unforeseen circumstances

Inherited Assets (Step-Up Basis)

Assets inherited from deceased individuals receive a "stepped-up" basis equal to fair market value at death.

Benefit: Eliminates capital gains tax on appreciation during deceased's lifetime
Example: Stock bought for $10,000, worth $50,000 at death gets $50,000 basis
Planning: Consider holding highly appreciated assets until death

Small Business Stock (Section 1202)

Qualified Small Business Stock can exclude up to $10 million or 10x basis from federal capital gains tax.

Requirements: C-corp, $50M+ gross assets, 5-year holding period
Exclusion: 100% of gain up to $10 million cap
Business: Must be active business (not passive investments)

Opportunity Zones

Investing capital gains in Qualified Opportunity Zone Funds can defer and potentially eliminate capital gains tax.

Deferral: Tax deferred until 2026 or earlier sale/exchange
10-Year Hold: Eliminate capital gains tax on Opportunity Zone investment
Timeline: Must invest within 180 days of realizing gain

Record Keeping and Documentation

Essential Records

  • Purchase Records: Date, price, brokerage statements
  • Sale Records: Date, price, transaction costs
  • Improvements: Receipts for capital improvements
  • Corporate Actions: Stock splits, dividends, mergers

Tax Forms and Reporting

  • Form 8949: Detailed capital gains and losses
  • Schedule D: Summary of capital gains/losses
  • Form 8960: Net Investment Income Tax
  • 1099-B: Broker reporting of securities sales

Frequently Asked Questions

What's the difference between long-term and short-term capital gains?

Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20% based on income. Short-term capital gains apply to assets held for one year or less and are taxed as ordinary income at rates up to 37%. The holding period is calculated from day after purchase to day of sale.

How do I calculate my cost basis for inherited assets?

Inherited assets receive a "stepped-up" basis equal to the fair market value on the date of the decedent's death (or alternate valuation date). This eliminates capital gains tax on appreciation that occurred during the deceased person's lifetime. For example, if someone inherited stock worth $100,000 that the deceased originally bought for $20,000, your basis is $100,000.

What is the Net Investment Income Tax (NIIT) and when does it apply?

NIIT is an additional 3.8% tax on investment income including capital gains. It applies to individuals when modified adjusted gross income exceeds $200,000 (single), $250,000 (married filing jointly), or $125,000 (married filing separately). The tax is calculated on the lesser of net investment income or the amount by which MAGI exceeds the threshold.

Can I use capital losses to reduce my tax bill?

Yes, capital losses offset capital gains dollar-for-dollar. If you have net capital losses, you can deduct up to $3,000 per year against ordinary income ($1,500 if married filing separately). Unused losses carry forward indefinitely to future years. This strategy, called tax-loss harvesting, can significantly reduce your tax liability.

Do I owe capital gains tax on my primary residence?

Most homeowners can exclude up to $250,000 ($500,000 if married) of capital gains from the sale of their primary residence. To qualify, you must have owned and lived in the home as your main residence for at least 2 of the 5 years before the sale. This exclusion can be used once every 2 years.

How are capital gains calculated for cryptocurrency transactions?

Cryptocurrency is treated as property for tax purposes. Each transaction (selling, trading, or spending crypto) is a taxable event. Your gain or loss equals the fair market value at the time of the transaction minus your cost basis. You must track the purchase date and price of each crypto unit to determine holding periods and calculate gains/losses accurately.

What records should I keep for capital gains tax purposes?

Keep detailed records of all asset transactions: purchase dates, prices, and costs; sale dates, prices, and expenses; records of capital improvements; corporate actions like stock splits; and brokerage statements. For real estate, maintain records of purchase price, closing costs, improvements, and depreciation claimed. Good record-keeping is essential for accurate tax reporting and audit protection.

Are there any strategies to minimize capital gains taxes legally?

Several legal strategies can minimize capital gains taxes: Hold assets for over one year to qualify for lower long-term rates; harvest losses to offset gains; donate appreciated assets to charity to avoid tax while getting a deduction; use retirement accounts for tax-deferred growth; consider installment sales to spread gains over multiple years; and explore Opportunity Zone investments for special tax benefits.

Related Investment Tools