Capital Gains Tax Calculator -- Investment Tax

Estimate capital gains tax on investments, real estate, or other assets

Calculate Capital Gains Tax

Enter your asset purchase and sale details to estimate your capital gains tax. This calculator auto-detects short-term vs. long-term holding periods and applies 2024/2025 federal tax brackets.

Original cost basis of the asset
Amount you sold (or plan to sell) the asset for
Renovation costs, broker fees, closing costs, etc.
Agent commissions, transfer taxes, etc.
Your ordinary taxable income (excluding this gain)
Total Gain / Loss
--
Estimated Tax
--
Net Proceeds
--

Gain / Loss Breakdown

Sale Price --
Purchase Price --
Improvements / Costs --
Selling Costs --
Adjusted Cost Basis --
Net Gain / Loss --

Tax Details

Holding Period --
Classification --
Tax Rate Applied --
NIIT (3.8%) --
Total Estimated Tax --
After-Tax Proceeds --
Disclaimer: This calculator provides estimates for educational purposes only. It does not account for state taxes, the alternative minimum tax (AMT), specific deductions, exemptions (such as the primary residence exclusion), or individual circumstances. This is not tax advice. Consult a qualified tax professional for your specific situation.

2024 Long-Term Capital Gains Tax Brackets

Long-term capital gains (assets held more than one year) are taxed at preferential rates. The brackets below are based on your total taxable income.

Rate Single Married Filing Jointly Married Filing Separately Head of Household
0% Up to $47,025 Up to $94,050 Up to $47,025 Up to $63,000
15% $47,026 -- $518,900 $94,051 -- $583,750 $47,026 -- $291,850 $63,001 -- $551,350
20% Over $518,900 Over $583,750 Over $291,850 Over $551,350

2025 Long-Term Capital Gains Tax Brackets

The 2025 brackets are adjusted for inflation. These apply to gains realized in tax year 2025.

Rate Single Married Filing Jointly Married Filing Separately Head of Household
0% Up to $48,350 Up to $96,700 Up to $48,350 Up to $64,750
15% $48,351 -- $533,400 $96,701 -- $600,050 $48,351 -- $300,000 $64,751 -- $566,700
20% Over $533,400 Over $600,050 Over $300,000 Over $566,700

Short-Term Capital Gains Tax Rates (2024)

Short-term capital gains (assets held one year or less) are taxed as ordinary income. The rates below apply:

Tax Rate Single Married Filing Jointly Married Filing Separately Head of Household
10%$0 -- $11,600$0 -- $23,200$0 -- $11,600$0 -- $16,550
12%$11,601 -- $47,150$23,201 -- $94,300$11,601 -- $47,150$16,551 -- $63,100
22%$47,151 -- $100,525$94,301 -- $201,050$47,151 -- $100,525$63,101 -- $100,500
24%$100,526 -- $191,950$201,051 -- $383,900$100,526 -- $191,950$100,501 -- $191,950
32%$191,951 -- $243,725$383,901 -- $487,450$191,951 -- $243,725$191,951 -- $243,700
35%$243,726 -- $609,350$487,451 -- $731,200$243,726 -- $365,600$243,701 -- $609,350
37%Over $609,350Over $731,200Over $365,600Over $609,350

How Capital Gains Tax Works

When you sell an asset for more than you paid, the profit is called a capital gain. In the United States, capital gains are subject to federal income tax, with the rate depending on how long you held the asset and your overall taxable income.

Cost Basis

Your cost basis is the original purchase price of an asset, plus certain adjustments. For real estate, this includes improvements (a new roof, kitchen renovation, etc.) and purchase-related costs (closing costs, title insurance). For stocks, it may include broker commissions. The higher your cost basis, the lower your taxable gain.

Capital Gain = Sale Price - Selling Costs - (Purchase Price + Improvements)

Short-Term vs. Long-Term

The IRS distinguishes between two types of capital gains based on how long you held the asset:

  • Short-term (held 1 year or less): Taxed at your ordinary income tax rate (10% to 37%)
  • Long-term (held more than 1 year): Taxed at preferential rates of 0%, 15%, or 20%

This distinction creates a strong incentive to hold investments for more than one year before selling.

Net Investment Income Tax (NIIT)

High-income taxpayers may also owe the 3.8% Net Investment Income Tax on capital gains if their modified adjusted gross income exceeds:

  • $200,000 for single filers
  • $250,000 for married filing jointly
  • $125,000 for married filing separately

This calculator includes a simplified NIIT estimate based on your total taxable income plus the capital gain.

Capital Losses and the Wash Sale Rule

Offsetting Gains with Losses

If you sell an asset at a loss, that capital loss can offset your capital gains, reducing your tax bill. The rules work as follows:

  • Short-term losses first offset short-term gains
  • Long-term losses first offset long-term gains
  • Any remaining net loss can offset the other type of gain
  • Up to $3,000 of net capital losses can be deducted against ordinary income per year ($1,500 if married filing separately)
  • Unused losses carry forward indefinitely to future tax years

The Wash Sale Rule

The wash sale rule (IRS Section 1091) prevents you from claiming a tax deduction on a loss if you purchase a "substantially identical" security within 30 days before or after the sale. Key points:

  • The 30-day window applies in both directions (61 total days)
  • It applies across all your accounts (brokerage, IRA, spouse's accounts)
  • The disallowed loss is added to the cost basis of the replacement shares
  • The wash sale rule does not apply to gains -- only losses
  • It currently does not apply to cryptocurrency (though this may change)

Primary Residence Exclusion

If you sell your primary home and meet certain requirements, you may exclude up to $250,000 of gain (or $500,000 for married filing jointly) from tax. To qualify, you must have owned and used the home as your primary residence for at least 2 of the 5 years before the sale. This exclusion is not accounted for in this calculator.

Frequently Asked Questions

What is a capital gain?

A capital gain is the profit you make when you sell an asset for more than you paid for it. The gain is the difference between the sale price and the cost basis (original purchase price plus certain adjustments like improvements or fees). If you sell for less than you paid, you have a capital loss.

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

Short-term capital gains apply to assets held for one year or less. They are taxed at your ordinary income tax rate, which can be as high as 37%. Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20%, depending on your taxable income and filing status.

How are capital gains taxed in the US?

Short-term gains are taxed as ordinary income (10% to 37%). Long-term gains are taxed at 0%, 15%, or 20% based on your taxable income and filing status. Additionally, high earners may owe the 3.8% Net Investment Income Tax (NIIT). State taxes may also apply but are not included in this calculator.

What is the Net Investment Income Tax (NIIT)?

The NIIT is a 3.8% surtax on net investment income (including capital gains, dividends, interest, and rental income) for individuals with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). It was enacted as part of the Affordable Care Act.

Can capital losses offset capital gains?

Yes. Capital losses can offset capital gains dollar for dollar. If your total capital losses exceed your total capital gains, you can deduct up to $3,000 of the net loss against ordinary income per year. Any remaining loss carries forward to future tax years indefinitely.

What is the wash sale rule?

The wash sale rule prevents you from claiming a tax loss on a security if you buy a substantially identical security within 30 days before or after the sale. The disallowed loss gets added to the cost basis of the replacement security, which can benefit you when you eventually sell that replacement.

Does this calculator account for state taxes?

No. This calculator estimates federal capital gains tax only. Many states also tax capital gains, often at their ordinary income tax rate. Some states (like California) do not offer preferential long-term capital gains rates. Consult your state's tax authority for state-specific information.

Does this calculator store my data?

No. All calculations run entirely in your browser. No financial data is sent to any server, and nothing is stored.

Related Tools

Privacy & Limitations

  • All calculations run entirely in your browser -- nothing is sent to any server.
  • Results are estimates for planning purposes and should not replace professional financial advice.

Related Tools

View all tools

Capital Gains Calculator FAQ

What is a capital gain?

A capital gain is the profit you make when you sell an asset (such as stocks, bonds, or real estate) for more than you paid for it. The gain is the difference between the sale price and the cost basis (original purchase price plus certain adjustments like improvements or fees).

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

Short-term capital gains apply to assets held for one year or less and are taxed at your ordinary income tax rate (10% to 37%). Long-term capital gains apply to assets held for more than one year and are taxed at preferential rates of 0%, 15%, or 20%, depending on your taxable income and filing status.

How are capital gains taxed in the US?

Short-term capital gains are taxed as ordinary income at rates from 10% to 37%. Long-term capital gains are taxed at 0%, 15%, or 20% depending on your taxable income and filing status. High earners may also owe the 3.8% Net Investment Income Tax (NIIT).

What is the Net Investment Income Tax (NIIT)?

The NIIT is a 3.8% surtax on investment income (including capital gains) for individuals with modified adjusted gross income above $200,000 (single) or $250,000 (married filing jointly). It applies in addition to regular capital gains tax.

Can capital losses offset capital gains?

Yes. Capital losses can offset capital gains dollar for dollar. If your losses exceed your gains, you can deduct up to $3,000 of net capital losses against ordinary income per year. Remaining losses carry forward to future tax years.

What is the wash sale rule?

The wash sale rule prevents you from claiming a tax loss on a security if you buy a substantially identical security within 30 days before or after the sale. If triggered, the disallowed loss is added to the cost basis of the replacement security.

Does this calculator store my data?

No. All calculations run entirely in your browser. No financial data is sent to any server, and nothing is stored.

Request a New Tool
Improve This Tool