Capital Gains Tax Rates: Short-Term, Long-Term, and NIIT

Complete guide to capital gains tax rates including 0/15/20% long-term brackets, NIIT 3.8% threshold, the $250K/$500K home exclusion, and Section 1231 property rules.

The InfoNexus Editorial TeamMay 23, 20269 min read

Selling at a Profit Has a Price

In 2022, the IRS collected approximately $270 billion in capital gains taxes — roughly 8% of all federal tax receipts. The rate applied to any given gain depends on a combination of how long you held the asset, your total taxable income, and whether the Net Investment Income Tax (NIIT) applies. Getting these distinctions wrong is expensive: the difference between a short-term and long-term capital gain can be 20+ percentage points in marginal tax rate for high earners.

Short-Term vs. Long-Term: The Holding Period Rule

Capital gains are classified by the holding period — the time between purchase and sale. Assets held one year or less generate short-term gains taxed as ordinary income, at rates up to 37% for 2024. Assets held more than one year qualify for preferential long-term rates.

The holding period is measured from the day after acquisition to the day of sale, inclusive. Selling stock purchased on January 15, 2023 requires holding through January 15, 2024 (minimum) to qualify for long-term treatment — but selling on January 14 would be short-term, taxed at ordinary income rates.

Long-Term Capital Gains Rates for 2024

Filing Status0% Rate (Income Up To)15% Rate (Income Up To)20% Rate (Above)
Single$47,025$518,900> $518,900
Married Filing Jointly$94,050$583,750> $583,750
Married Filing Separately$47,025$291,850> $291,850
Head of Household$63,000$551,350> $551,350

The 0% rate is frequently underutilized. A married couple with $80,000 in taxable income can realize up to $14,050 in long-term gains completely tax-free, since total income ($94,050) would still fall within the 0% threshold. Strategic gain harvesting — deliberately realizing gains in low-income years — is a legitimate and underused tax minimization technique.

The Net Investment Income Tax (NIIT)

The Affordable Care Act added a 3.8% surtax on net investment income (NII) for taxpayers above certain thresholds. This tax layers on top of capital gains rates, not instead of them.

  • Threshold: $200,000 (single) / $250,000 (married filing jointly) of modified adjusted gross income (MAGI)
  • Applies to: capital gains, dividends, interest, passive income from partnerships/S-corps, rental income
  • Does NOT apply to: wages, active business income, Social Security, tax-exempt interest
  • The 3.8% applies to the lesser of NII or the excess of MAGI over the threshold

For high-income earners, combining the 20% long-term rate with NIIT produces a 23.8% federal rate on long-term gains — plus applicable state taxes. In California (13.3% state rate on all gains, with no preferential long-term rate), the combined federal-state burden on long-term gains reaches 37.1%.

The Primary Home Exclusion

Section 121 of the Internal Revenue Code provides the most valuable capital gains exclusion available to ordinary taxpayers: up to $250,000 in gain ($500,000 for married filing jointly) from the sale of a primary residence is excluded from taxable income.

Qualification requires:

  • You owned the home for at least 2 of the 5 years before the sale (ownership test)
  • You used it as your principal residence for at least 2 of the 5 years before the sale (use test)
  • You have not used the exclusion in the past 2 years

The ownership and use periods do not need to overlap. You could rent a home for two years, move in for two years, then sell — the gain would still qualify. The exclusion is not indexed for inflation, meaning it provides less effective protection in high-appreciation markets than when it was enacted in 1997.

Exclusion Limitations

Depreciation recapture on any home office or rental use portion of the property is not excludable. Gains attributable to depreciation deductions taken (or allowable) during a period of business or rental use are taxed as unrecaptured Section 1250 gain at up to 25%.

Section 1231 Property: Business Assets

Section 1231 of the tax code governs gains and losses from the sale of depreciable property and land used in a trade or business, held for more than one year. Real estate used in business (commercial buildings, rental properties), machinery, and equipment all fall under Section 1231.

ScenarioTax Treatment
Net Section 1231 gain for the yearTreated as long-term capital gain (preferential rates)
Net Section 1231 loss for the yearTreated as ordinary loss (fully deductible)
Net gain, but with prior Section 1231 lossesGain taxed as ordinary income to extent of prior losses (5-year lookback)
Depreciation recapture (real property)Section 1250, taxed at up to 25% as unrecaptured gain

The asymmetric treatment — gains taxed at preferential rates, losses fully deductible — makes Section 1231 the most favorable tax category for business-asset dispositions. The catch is the 5-year lookback rule: if you claimed ordinary Section 1231 losses in any of the five prior years, current gains are converted back to ordinary income up to the amount of those prior losses.

Practical Planning Considerations

  • Tax-loss harvesting: Realizing capital losses to offset gains can reduce your current-year tax bill, but the wash-sale rule (30 days before/after) prohibits repurchasing substantially identical securities
  • Installment sales: Spreading gain recognition across multiple years via installment sale can prevent income from spiking into higher rate brackets or triggering NIIT
  • Charitable giving of appreciated securities: Donating stock directly avoids capital gains tax entirely and generates a deduction for the full fair market value
  • Opportunity Zones: Gains reinvested in Qualified Opportunity Funds receive deferral and potential exclusion benefits under current law

This article is for informational purposes only and does not constitute financial or tax advice.

taxesinvestingpersonal finance

Related Articles