The capital gains tax rate depends on how long you held the asset and your ordinary income level

The federal capital gains tax is not a single percentage. The IRS taxes long-term capital gains — assets you held for more than one year — at 0%, 15%, or 20%, depending on your taxable income. Short-term capital gains, on assets held one year or less, are taxed as ordinary income at rates ranging from 10% to 37%. Your state may also tax capital gains, and that rate varies by state.

This matters because the same $10,000 gain can cost you $0 in federal tax, $1,500, or $3,700 — or even more if your state has a capital gains tax — depending on when you sold and how much other income you earned that year.

Key Takeaways

  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% federally; short-term gains are taxed at your ordinary income rate, which can be as high as 37%.
  • Your tax bracket for capital gains is determined by your total taxable income, not by the gain itself, so a large gain can push you into a higher rate.
  • Most states do not tax capital gains, but a growing number — including California, New York, and Washington — have introduced or are considering capital gains taxes ranging from 1% to 13.3%.
  • The difference between holding an asset 366 days versus 365 days can save you thousands in tax on the same gain.

How the three federal long-term capital gains rates work

The 0% rate applies to long-term gains if your taxable income falls below a threshold. For 2024, that threshold is $47,025 for single filers and $94,050 for married filing jointly. If your income is below that line, you owe no federal tax on long-term gains, even if you sold stock at a profit.

The 15% rate is the middle tier. It applies to long-term gains once your income exceeds the 0% threshold but stays below a second threshold. For 2024, that second threshold is $518,900 for single filers and $583,750 for married filing jointly. Most people who pay capital gains tax pay at this rate.

The 20% rate applies to long-term gains above those income thresholds. This is the highest federal rate. It also applies to high-income earners subject to the Net Investment Income Tax, which adds an additional 3.8% to certain investment income, bringing the effective rate to 23.8% for those taxpayers.

These thresholds adjust each year for inflation. The IRS publishes updated brackets in late fall for the following tax year.

Why short-term gains cost more than long-term gains

Short-term capital gains — from assets you sold within one year of buying them — are taxed as ordinary income. This means they are added to your wages, self-employment income, and other earnings, and taxed at whatever rate applies to that combined total.

If you earn $60,000 in salary and realize a $20,000 short-term gain, the IRS treats you as having $80,000 in income. That $20,000 gain is taxed at your marginal rate — the rate that applies to your highest dollars of income. For many people, that is 22% or 24%, significantly higher than the 15% long-term rate.

This is why timing matters. Holding an asset just long enough to may have access to for long-term treatment can reduce your tax bill substantially on the same dollar amount of gain.

How your income level determines your capital gains tax bracket

Capital gains tax brackets are stacked on top of your ordinary income, not separate from it. This means a large gain can push you from the 15% bracket into the 20% bracket, or from the 0% bracket into the 15% bracket.

Example: You are a single filer with $40,000 in salary. You sell stock and realize a $20,000 long-term gain. Your taxable income is now $60,000. The first $7,025 of your gain falls in the 0% bracket (up to $47,025). The remaining $12,975 falls in the 15% bracket. You owe $1,946 in federal capital gains tax on that $20,000 gain, not $3,000.

This stacking effect means you cannot know your capital gains tax rate without knowing your total income for the year. A gain that would be taxed at 0% in a low-income year might be taxed at 15% or 20% in a year when you also received a bonus or sold another asset.

State capital gains taxes vary widely or do not exist

Most states do not tax capital gains at all. They tax only wages, sales, and property. But a growing number have introduced capital gains taxes in recent years.

California taxes long-term capital gains as ordinary income at rates up to 13.3%. New York has a 7% capital gains tax on gains over $1 million. Washington has a 7% tax on long-term gains over $250,000. Illinois taxes capital gains at 4.95%. Oregon taxes them at rates up to 9.9%. These rates and thresholds vary and have changed in recent years.

If you live in a state with a capital gains tax and sell an asset at a profit, you will owe both the federal tax and your state tax. A $100,000 long-term gain could be taxed at 15% federally and 7% at the state level, for a combined 22% rate, depending on your income and state.

Some states have proposed capital gains taxes but have not yet enacted them. Tax law changes frequently, so check your state's current rules before calculating what you owe.

The difference between holding periods and tax rates

The one-year holding period is a hard line. Assets held 365 days are short-term; assets held 366 days are long-term. The IRS counts from the day after you buy to the day you sell.

This creates a powerful incentive to wait. If you bought stock on January 15, 2024, and sold it on January 14, 2025, it is short-term. If you sold it on January 15, 2025, it is long-term. The one-day difference could mean paying 22% instead of 15% — a difference of $700 on a $10,000 gain.

Some investors deliberately time sales to cross the one-year mark, especially late in the year. Others hold assets longer than they otherwise would to capture the long-term rate. This is legal tax planning, not tax evasion.

How to find your specific capital gains tax rate

To calculate what you will owe on a capital gains sale, you need three pieces of information: the size of your gain, your total taxable income for the year, and your state of residence.

Start with your federal ordinary income — wages, self-employment income, interest, dividends, and other non-capital-gains income. Add your long-term capital gains to that total. Look up the 2024 long-term capital gains brackets (or the year you are filing for) on the IRS website or in the instructions to Form 1040. Find which bracket your total income falls into. That is your federal rate.

Then check your state's capital gains tax rules. If your state taxes capital gains, explore that rate to your gain as well. Add the two percentages together for your combined rate.

If you have both short-term and long-term gains, calculate short-term gains first — they are taxed as ordinary income — then long-term gains using the brackets above.

Frequently Asked Questions

Can I avoid capital gains tax by holding an asset longer?

Holding an asset longer than one year changes the tax rate from your ordinary income rate (up to 37%) to the long-term rate (0%, 15%, or 20%), which saves most people money. But you cannot avoid the tax entirely by holding longer — you still owe tax when you sell. The only way to avoid capital gains tax is to not sell, or to sell at a loss.

Do I owe capital gains tax if I inherit stock?

No, not on the inherited stock itself. Inherited assets receive a "step-up in basis," meaning the IRS values them at their market price on the date of death. If you inherit stock worth $50,000 and sell it the next day for $50,000, you have no gain and owe no tax. You only owe tax on gains that occur after you inherit.

What if I have a capital loss instead of a gain?

You can use capital losses to offset capital gains. If you have a $10,000 gain and a $3,000 loss, you owe tax on only $7,000. If losses exceed gains, you can deduct up to $3,000 of the excess loss against ordinary income in that year. Unused losses carry forward to future years.

Do I have to pay capital gains tax the year I sell, or can I defer it?

You owe tax in the year you sell, when you file your tax return. You cannot defer it to a future year. However, some investments like 401(k)s and IRAs allow you to defer or avoid capital gains tax entirely on the gains inside the account — that is a different rule from the capital gains tax itself.

Why is the capital gains rate lower than the ordinary income rate?

Congress set the long-term capital gains rate lower than ordinary income rates to encourage long-term investment. The theory is that lower taxes on investment gains incentivize people to buy and hold assets, which supports economic growth. Whether this policy achieves that goal is debated, but the rate difference is intentional.