Capital Gains Tax Calculator

Capital Gains Tax Calculator

Estimate federal and state capital gains tax on stocks, real estate, cryptocurrency, and other investments. Enter your cost basis, sale price, holding period, and income to see your tax rate, total tax owed, and net gain after tax. Covers 2026 long-term and short-term rates, NIIT, and the Section 121 home sale exclusion.

Capital Gains Tax Calculator · 2026

Federal LT rates 0%/15%/20% · NIIT 3.8% · Section 121 exclusion · State tax estimates

Investment Details
Your Tax Situation

Enter your investment details to estimate capital gains tax for 2026.

What Are Capital Gains Taxes?

Capital gains taxes are federal (and usually state) taxes on the profit earned when you sell a capital asset for more than you paid for it. Capital assets include stocks, bonds, ETFs, mutual funds, real estate, cryptocurrency, and collectibles. The tax applies only to the gain, the difference between what you paid (cost basis) and what you received (proceeds), minus any selling costs.

The federal rate depends on two factors: how long you held the asset and your total taxable income. Assets held more than one year qualify for preferential long-term rates of 0%, 15%, or 20%. Assets held one year or less are taxed as ordinary income at your marginal rate, which can run from 10% to 37%. The OBBBA (signed July 4, 2025) made these rates permanent with no expiration date.

2026 Long-Term Capital Gains Tax Rates

Long-term capital gains tax rates apply to assets held more than one year. Rates are based on taxable income, meaning your adjusted gross income after the standard deduction (or itemized deductions), rather than your gross income. The 2026 thresholds reflect a 2.7% inflation adjustment from 2025 (IRS Rev. Proc. 2025-32).

RateSingle FilersMarried Filing JointlyHead of HouseholdMFS
0%Up to $49,450Up to $98,900Up to $66,750Up to $49,450
15%$49,451 to $533,400$98,901 to $600,050$66,751 to $566,700$49,451 to $300,025
20%Over $533,400Over $600,050Over $566,700Over $300,025

* Based on taxable income (after standard deduction or itemized deductions). Source: IRS Revenue Procedure 2025-32. Rates made permanent by the OBBBA (July 4, 2025).

The 0% rate is one of the most underused tax breaks available. A single filer with taxable income up to $49,450 in 2026 pays zero federal capital gains tax on long-term gains. For a married couple, the threshold doubles to $98,900. Retirees drawing from savings, people in low-income years, and those harvesting losses can often realize significant gains at 0% with careful income management. Use the calculator above to see which bracket your gain falls into.

Short-Term Capital Gains Tax Rates 2026

Assets held one year or less produce short-term capital gains taxed as ordinary income at your marginal federal bracket. These rates are significantly higher than long-term rates for most earners, which is why holding an asset even one additional day past the one-year mark can substantially reduce your tax bill.

Taxable Income (Single)Short-Term Rate
Up to $11,92510%
$11,926 to $48,47512%
$48,476 to $103,35022%
$103,351 to $197,30024%
$197,301 to $250,52532%
$250,526 to $626,35035%
Over $626,35037%

Net Investment Income Tax (NIIT): The 3.8% Surtax

High-income investors pay an additional 3.8% Net Investment Income Tax on capital gains when their modified adjusted gross income (MAGI) exceeds certain thresholds. The NIIT applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold.

Filing StatusMAGI ThresholdEffective Federal CG Rate (LT)
Single / HoH$200,00015% + 3.8% = 18.8%, or 20% + 3.8% = 23.8%
Married Filing Jointly$250,00015% + 3.8% = 18.8%, or 20% + 3.8% = 23.8%
Married Filing Separately$125,000Same effective rates

* NIIT thresholds have been fixed at these levels since 2013 and are not adjusted for inflation, meaning more taxpayers hit this threshold every year. NIIT applies on top of regular capital gains rates and state taxes.

NIIT example: A single filer has $250,000 MAGI and $80,000 in long-term capital gains. Their MAGI exceeds the $200,000 threshold by $50,000. NIIT applies to the lesser of $80,000 (net investment income) or $50,000 (excess MAGI). NIIT = $50,000 × 3.8% = $1,900. Federal long-term CG tax = $80,000 × 15% = $12,000. Total federal tax on the gain = $13,900.

Real Estate Capital Gains Tax: The Section 121 Exclusion

Homeowners receive an enormous tax benefit when selling a primary residence. Under Section 121 of the Internal Revenue Code, you can exclude up to $250,000 of gain from federal tax if filing single, or up to $500,000 if married filing jointly. To qualify, you must meet two tests:

  • Ownership test: You owned the home for at least 2 of the 5 years before the sale date.
  • Use test: You lived in the home as your primary residence for at least 2 of the 5 years before the sale date.

The two years can be non-consecutive, and the ownership and use periods can overlap but are counted separately. You can only claim this exclusion once every two years.

🏠
Example: A single filer bought a home for $350,000 in 2019 and sells for $700,000 in 2026, a $350,000 gain. The Section 121 exclusion covers $250,000 of that gain. Only $100,000 remains taxable. At a 15% long-term rate, federal tax on the gain is $15,000 instead of $52,500 on the full amount. The exclusion alone saves $37,500 in federal tax. Enter "Real Estate (Primary Residence)" as the asset type in the calculator above to apply this exclusion automatically.

Investment Property and Depreciation Recapture

Rental and investment properties are subject to the full capital gains tax with no Section 121 exclusion. Additionally, if you claimed depreciation deductions during ownership, the IRS recaptures those deductions at a maximum rate of 25% when you sell, even if the overall gain qualifies for the lower long-term rate. A 1031 exchange lets real estate investors defer all capital gains tax by reinvesting proceeds into another qualifying investment property within strict time limits (45 days to identify, 180 days to close).

Special Capital Gains Tax Rates in 2026

Asset TypeRateNotes
Stocks, ETFs, Funds (LT)0%, 15%, or 20%Standard long-term rates based on income bracket
Stocks, ETFs, Funds (ST)10%–37%Ordinary income rates apply
CryptocurrencySame as stocksLT or ST depending on holding period; each transaction is a taxable event
Collectibles (art, coins, metals)Max 28% LT25% and 28% brackets cap at this rate; ST taxed as ordinary income
Unrecaptured §1250 gain (real estate)Max 25%Depreciation recapture on real estate; applies to the portion previously depreciated
QSBS (§1202 qualified small business stock)0% (up to $10M)100% exclusion for qualifying stock held more than 5 years; state treatment varies
Inherited assetsLT rates applyStep-up in cost basis to fair market value at date of death; gain measured from that point

How to Reduce Capital Gains Tax Legally

Hold Investments More Than One Year

The single most powerful lever on capital gains tax is the holding period. Selling one day too soon can push a gain from a 15% rate to a 22% or 24% rate for a middle-income earner. On a $50,000 gain, the difference between a 15% long-term rate and a 22% short-term rate is $3,500 in additional federal tax. Set a calendar alert for the one-year date on any significant position you're considering selling.

Tax-Loss Harvesting

Capital losses offset capital gains dollar for dollar. If you sell a losing position, the loss reduces your taxable gain for the year. Losses in excess of gains can offset up to $3,000 of ordinary income per year, with any remaining balance carried forward to future years. The wash-sale rule prevents you from repurchasing the same or substantially identical security within 30 days before or after the sale and still claiming the loss.

Use Tax-Advantaged Accounts

Stocks and funds held inside a 401(k), traditional IRA, or Roth IRA are completely sheltered from capital gains tax while in the account. Roth IRA gains are tax-free at qualified withdrawal, the best possible outcome for long-term investors. Selling high-appreciation assets inside these accounts produces zero immediate capital gains tax.

Manage Taxable Income to Stay in a Lower Bracket

Strategic retirement contributions (401k, SEP-IRA, solo 401k), deductible IRA contributions, and charitable giving can all reduce your taxable income. Dropping below the 0% capital gains threshold (e.g., $49,450 for single filers in 2026) means long-term gains are completely tax-free at the federal level. This strategy is most powerful for retirees and people in transition years.

Frequently Asked Questions

What are capital gains taxes?
Capital gains taxes are taxes on the profit from selling a capital asset, stocks, real estate, cryptocurrency, collectibles, or other investments, for more than you paid for it. The gain equals the sale price minus your cost basis (what you paid plus qualifying costs). The federal tax rate on long-term gains (assets held more than one year) is 0%, 15%, or 20% depending on your taxable income. Short-term gains (one year or less) are taxed as ordinary income from 10% to 37%. Most states also tax capital gains at their income tax rates, though five states (TX, FL, NV, WY, SD) have no income tax at all.
What is the capital gains tax rate for 2026?
For 2026, the federal long-term capital gains tax rates are 0%, 15%, and 20%, depending on taxable income and filing status. Single filers with taxable income up to $49,450 pay 0%. Income from $49,451 to $533,400 falls in the 15% bracket. Above $533,400, the rate is 20%. For married filing jointly, the 0% threshold is $98,900, the 15% bracket extends to $600,050, and the 20% rate applies above that. High earners also owe an additional 3.8% Net Investment Income Tax (NIIT) when MAGI exceeds $200,000 (single) or $250,000 (MFJ), pushing the effective top federal rate to 23.8%. The OBBBA (signed July 4, 2025) made these rates permanent.
What is the long-term capital gains tax rate?
The federal long-term capital gains tax rate in 2026 is 0%, 15%, or 20%, applied to assets held more than one year. These preferential rates are substantially lower than ordinary income rates, which can reach 37%. The majority of individual investors pay the 15% rate. The 0% rate applies to single filers with taxable income below $49,450 and married couples below $98,900, a valuable benefit for retirees and lower-income investors. The 20% rate hits only the highest earners (above $533,400 for single filers). All three rates were made permanent by the OBBBA signed July 4, 2025.
How do I avoid capital gains tax on real estate?
For a primary residence, Section 121 lets you exclude up to $250,000 of gain from federal tax (single) or $500,000 (married filing jointly), provided you owned and lived in the home for at least 2 of the 5 years before the sale. This exclusion is the most significant capital gains tax break in the tax code for most homeowners. For investment or rental properties, a 1031 exchange allows you to defer all capital gains tax by reinvesting proceeds into another qualifying investment property. You must identify a replacement property within 45 days of the sale and close within 180 days. A qualified intermediary handles the exchange to keep you out of constructive receipt of the funds.
Do I pay capital gains tax on cryptocurrency?
Yes. The IRS classifies cryptocurrency as property, not currency, making every sale, exchange, or conversion a taxable event. The same long-term and short-term rules apply: hold crypto more than one year for the lower long-term rates (0%, 15%, or 20%); sell within one year and pay ordinary income rates up to 37%. This applies whether you sell for dollars, trade one crypto for another, or use crypto to buy goods. Staking rewards and mining income are generally treated as ordinary income at receipt, then subject to capital gains rules when the coins are later sold.
What is the Net Investment Income Tax (NIIT)?
The NIIT is a 3.8% federal surtax on investment income for high earners. It applies when your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly). The tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. Net investment income includes capital gains, dividends, interest, rental income, and passive business income, but not wages or self-employment income. Because the NIIT thresholds have been frozen at the same levels since 2013 without inflation adjustment, more taxpayers hit them every year. At the top income level, the combined federal long-term capital gains rate reaches 23.8% (20% + 3.8%).
How can I reduce capital gains tax?
The most effective strategies: (1) Hold investments more than one year to qualify for long-term rates. (2) Use tax-loss harvesting, sell losing positions to offset gains dollar for dollar. (3) Shelter investments inside 401(k)s, IRAs, or Roth IRAs where capital gains taxes don't apply. (4) Manage taxable income to stay in a lower bracket, contributions to deductible retirement accounts reduce AGI. (5) For real estate, use the Section 121 exclusion ($250K single / $500K MFJ on a primary residence). (6) For investment real estate, use a 1031 exchange to defer gains into a new property. (7) Donate appreciated securities directly to charity instead of selling them, you avoid all capital gains tax and deduct the full fair market value.
2026 LT Capital Gains Brackets
IRS Rev. Proc. 2025-32 · Permanent (OBBBA) 0% (Single) Taxable income up to $49,450 0% (MFJ) Taxable income up to $98,900 15% Most middle-income earners 20% (Single) Above $533,400 20% (MFJ) Above $600,050 NIIT surcharge +3.8% above $200K/$250K MAGI Effective top rate 23.8% federal
Section 121 Home Sale Rules
Single exclusion $250,000 of gain tax-free MFJ exclusion $500,000 of gain tax-free Ownership test Own home 2 of last 5 years Use test Live in home 2 of last 5 years Frequency limit Once every 2 years Investment property Section 121 unavailable 1031 exchange Defer tax on investment RE
Special Rates (2026)
Collectibles Max 28% (LT) Unrecaptured §1250 Max 25% (depreciation) QSBS §1202 0% up to $10M (>5 yr hold) Crypto Same as stocks (property rule) Inherited assets Stepped-up basis at death Wash-sale rule 30-day window applies