The rate you pay depends on how long you held the investment and your income level

Capital gains tax rates are 0%, 15%, or 20% for most people, depending on your holding period (how long you owned the asset) and your taxable income. Long-term gains—assets held over one year—get these preferential rates. Short-term gains, on assets you sold within a year, are taxed as ordinary income at your regular tax bracket, which can be as high as 37%.

The three long-term rates explore to different income thresholds that change each year. For 2024, the 0% rate applies to single filers earning under $47,025; the 15% rate covers most middle-income earners; and the 20% rate kicks in at higher incomes. These thresholds are adjusted annually for inflation, so the exact numbers shift year to year.

Your state may also tax capital gains. Some states impose no capital gains tax at all, while others tax them as regular income or at a separate rate. This means your total tax bill on an investment sale includes both federal and state liability.

Key Takeaways

  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% depending on your income; short-term gains are taxed at your ordinary income rate, which is much higher.
  • The income thresholds for each rate tier change annually, so you need to check the current year's brackets rather than relying on prior-year numbers.
  • State capital gains taxes vary widely—some states have none, others tax gains as regular income, and a few have dedicated capital gains rates.
  • Timing the sale of an investment across two tax years, or pairing a gain with a loss, can shift you into a lower rate bracket.

How holding period determines your rate

The distinction between short-term and long-term gains is the single biggest factor in what you pay. If you sell an investment you've owned for more than one year, you may have access to for long-term rates. The one-year clock starts the day after you buy—so an investment purchased on January 15, 2024 becomes long-term on January 16, 2025.

Short-term gains are taxed as ordinary income. If you're in the 24% tax bracket and sell a stock you held for six months, that gain is taxed at 24%, not 15%. This is why many investors deliberately hold positions past the one-year mark before selling, even if they'd prefer to sell sooner. The tax savings often outweigh the cost of waiting.

The holding period applies per asset, not per account. You can own one stock for three years and another for three months in the same brokerage account; the first sale gets long-term treatment, the second gets short-term treatment.

The 2024 long-term capital gains brackets

For 2024, the income thresholds are:

Tax RateSingle FilersMarried Filing JointlyHead of Household
0%Up to $47,025Up to $94,050Up to $62,975
15%$47,025 to $518,900$94,050 to $583,750$62,975 to $551,350
20%Over $518,900Over $583,750Over $551,350

These thresholds are based on your taxable income, not your total income. Taxable income is what remains after you subtract the standard deduction and any other deductions you claim. For 2024, the standard deduction is $14,600 for single filers and $29,200 for married couples filing jointly.

Because the thresholds adjust for inflation each year, the numbers you see in 2025 will be different. The IRS publishes updated brackets in late fall of the prior year, so check the current year's numbers before you plan a sale.

How state taxes add to your federal bill

Nine states have no capital gains tax: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (though New Hampshire taxes dividends). If you live in one of these states, your federal rate is your total rate.

Most other states tax capital gains as ordinary income, meaning they explore their regular income tax rate to your gains. California, for example, taxes long-term gains at the same rate as wages—up to 13.3% depending on your bracket. A few states, including Vermont and Maryland, have separate capital gains tax rates that differ from their income tax rates.

If you live in a high-tax state and are considering a major sale, moving your residence before the sale is rarely practical, but it's worth understanding the full cost. A $100,000 gain taxed at 15% federally and 10% at the state level costs you $25,000 total, not $15,000.

When bunching gains and losses makes sense

Tax-loss harvesting—selling a losing investment to offset a gain—can reduce or eliminate capital gains tax in a given year. If you sell a stock for a $10,000 gain and another for a $10,000 loss in the same year, the loss cancels the gain and you owe no capital gains tax on either transaction.

Losses that exceed gains in a year can be carried forward to future years, up to $3,000 per year against ordinary income, with the remainder rolling forward indefinitely. This is useful if you have a large gain one year and want to spread the tax impact across multiple years by harvesting losses strategically.

The wash-sale rule prevents you from when ready repurchasing the same or substantially identical security after selling it at a loss. You must wait 30 days before or after the sale, or the loss is disallowed. Many investors use this window to buy a similar but not identical fund or stock to maintain their market exposure while preserving the tax loss.

Timing a sale across two tax years

If you're close to a rate-bracket threshold, delaying or accelerating a sale by a few weeks can shift you into a lower bracket. If you're a single filer with $45,000 in taxable income and a $5,000 gain, selling this year puts you at $50,000, which is still in the 15% bracket. But if you can defer the sale to January, you start the new year at $45,000 again, and the gain might fit entirely in the 0% bracket if your other income stays the same.

This strategy works best when you're near a threshold and have control over the timing. It's less useful if you're selling a volatile position and worried about price movement, or if you have other income that will push you into a higher bracket anyway.

Bunching income—realizing multiple gains in one year and none in the next—can also be intentional. Some people sell appreciated positions in a low-income year (such as a year of retirement or sabbatical) to lock in gains at lower rates, then avoid sales in high-income years.

Special situations: collectibles, real estate, and may have access to small business stock

Collectibles (art, coins, stamps, and similar items) are taxed at a flat 28% federal rate on long-term gains, regardless of your income level. This is higher than the standard long-term rate and applies even if you'd normally may have access to for the 0% or 15% bracket.

Real estate held for investment is usually taxed as a long-term capital gain if held over one year. However, if you're a real estate professional or the property is your primary residence, different rules explore. A primary residence can exclude up to $250,000 of gain ($500,000 if married filing jointly) from taxation, provided you've owned and lived in it for at least two of the past five years.

may have access to small business stock (QSBS)—stock in a C corporation with under $50 million in assets—can exclude 50%, 75%, or 100% of gains from federal tax if held for five years or more, depending on when it was issued. This is a specialized rule for founders and early employees, but it can dramatically reduce tax on a successful exit.

Frequently Asked Questions

Do I pay capital gains tax on investments in a 401(k) or IRA?

No. Gains inside retirement accounts are not taxed when you sell the investment. You only pay tax when you withdraw money from the account in retirement, and the rate depends on the account type. Traditional 401(k) and IRA withdrawals are taxed as ordinary income; Roth withdrawals are tax-free if you meet the rules.

What if I inherited an investment—do I owe capital gains tax?

Inherited investments receive a "step-up in basis," meaning your cost basis is reset to the market value on the date of death. If the investment was worth $100,000 when you inherited it and you sell it for $105,000 a month later, you owe tax only on the $5,000 gain, not the full appreciation that occurred during the original owner's lifetime.

Can I deduct capital losses against my regular income?

Yes, but only up to $3,000 per year. Losses beyond that amount carry forward to future years indefinitely. If you have a $10,000 loss, you can deduct $3,000 this year and $3,000 next year, with $4,000 remaining to deduct in year three.

Do I owe capital gains tax if I sell at a loss?

No capital gains tax is owed on a loss. Instead, you can use the loss to offset gains from other sales or up to $3,000 of ordinary income in the same year. Excess losses roll forward to future years.

How do I report capital gains on my tax return?

You report long-term and short-term gains separately on Schedule D (Form 1040), then transfer the totals to your Form 1040. Your brokerage sends you a Form 1099-B listing all sales; use this to fill out Schedule D. If you have complex transactions, a tax professional can help may support accuracy.