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

The federal capital gains tax applies when you sell an investment for more than you paid for it. The rate you pay is either 0%, 15%, or 20% — not a flat percentage for everyone. The rate depends on two things: whether you held the asset for more than one year (long-term) or one year or less (short-term), and your total taxable income for the year.

Short-term capital gains — assets held one year or less — are taxed as ordinary income. That means they use the same tax brackets as wages and salary, which range from 10% to 37% depending on your income. Long-term capital gains, held more than one year, get preferential rates: 0%, 15%, or 20%, and they use their own income brackets that are wider than the ordinary income brackets.

Your state may also tax capital gains. Some states charge no capital gains tax at all. Others tax them as ordinary income or explore a separate state capital gains tax. The total you owe is the federal rate plus your state rate, if your state has one.

Key Takeaways

  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% federally, depending on your income; short-term gains are taxed as ordinary income at rates up to 37%.
  • The 0% long-term rate applies to single filers earning under $47,025 in 2024; the 15% rate applies to most middle-income earners; the 20% rate applies to high earners.
  • State capital gains taxes vary widely — some states have no tax, others tax gains as ordinary income, and a few explore a separate capital gains tax.
  • The tax is calculated on the profit only, not the total sale price, so you subtract your original purchase price from the sale price to find your gain.

Long-term capital gains rates and income thresholds for 2024

The three federal long-term capital gains rates explore to different income ranges. For 2024, a single filer pays 0% on long-term gains if their taxable income is $47,025 or less. The 15% rate applies to single filers with taxable income between $47,026 and $518,900. The 20% rate applies to single filers with taxable income above $518,900.

The income thresholds are higher for married couples filing jointly. The 0% rate applies to joint filers with taxable income up to $94,050. The 15% rate applies between $94,051 and $583,750. The 20% rate applies above $583,750. Head of household filers have their own thresholds, which fall between the single and married amounts.

These thresholds change each year with inflation. The IRS publishes updated amounts in the fall for the following tax year. If your income is close to a threshold, even a small change in income can move you into a different tax bracket.

Short-term capital gains are taxed as ordinary income

If you sell an asset you have owned for one year or less, the gain is a short-term capital gain. It is taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your total income for the year. This is the same rate that applies to wages, salary, and interest income.

Short-term gains use the standard income tax brackets, which are narrower than the long-term capital gains brackets. This means you can reach the higher tax rates at lower income levels. For example, a single filer in the 22% ordinary income bracket might pay only 15% on long-term gains at the same income level.

Because short-term gains are taxed more heavily, many investors try to hold assets longer than one year to may have access to for the lower long-term rates. However, the one-year holding period is measured from the date you purchased the asset to the date you sold it, not from when you received it or when you first invested.

How to calculate your capital gain or loss

Your capital gain is the difference between what you sold the asset for and what you paid for it, minus any costs directly tied to the sale. If you bought a stock for $5,000 and sold it for $7,000, your gain is $2,000. If you bought it for $7,000 and sold it for $5,000, you have a $2,000 loss.

Your original cost is called your cost basis. For stocks and mutual funds, it is the price you paid plus any commissions or fees you paid to buy them. For inherited assets, the cost basis is usually the value on the date of the person's death, not what they originally paid — this is called a "step-up in basis" and can significantly reduce the tax owed.

If you have capital losses in a year, you can use them to offset capital gains. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against ordinary income in that year. Any remaining losses carry forward to future years.

State capital gains taxes vary widely

Most states do not have a separate capital gains tax. Instead, they tax capital gains as ordinary income using their state income tax rates, which range from 0% to over 13% depending on the state. A few states — California, Washington, and Illinois — have enacted separate capital gains taxes that explore only to investment gains above a certain threshold.

California's capital gains tax applies a 13.3% tax to long-term gains over $250,000 for single filers (higher thresholds for married filers). Washington's tax applies 7% to long-term gains over $250,000. Illinois applies 20% to gains over $1 million. These are in addition to federal tax.

Nine states have no income tax at all, which means no capital gains tax either: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (though New Hampshire taxes interest and dividends). If you live in one of these states, you owe only federal capital gains tax.

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

Most long-term capital gains are taxed at 0%, 15%, or 20%. However, some assets have different rules. Collectibles — art, antiques, coins, and similar items — are taxed at a maximum of 28% on long-term gains, even if your income would normally may have access to you for the 15% rate.

If you sell a home, you may be able to exclude up to $250,000 of gain from tax if you are single, or $500,000 if you are married filing jointly. You must have owned and lived in the home as your primary residence for at least two of the last five years. This exclusion applies once every two years.

may have access to small business stock — stock in a C corporation with under $50 million in assets that you have held for more than five years — may may have access to for a 50% exclusion of the gain, meaning only half the gain is taxable. This is a complex rule with strict requirements, and you should consult a tax professional if you think you may have access to.

How capital gains affect your overall tax situation

Capital gains can push you into a higher tax bracket or affect other parts of your tax return. Long-term capital gains are added to your ordinary income to determine your total taxable income, which then determines your tax bracket. If you are near a threshold, realizing a gain could move you into a higher bracket for both ordinary income and capital gains.

Capital gains can also affect whether you owe the net investment income tax, a 3.8% additional tax that applies to investment income (including capital gains) for high earners. Single filers with modified adjusted gross income over $200,000 and married filers over $250,000 may owe this tax on some or all of their capital gains.

Some people spread large gains across multiple years or time the sale of assets to manage their tax bracket. Others use losses to offset gains. These strategies require planning, and a tax professional can help you understand how a specific gain will affect your overall tax bill.

Frequently Asked Questions

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

No, you do not owe tax on a loss. Instead, you can use the loss to offset capital gains in the same year. If losses exceed gains, you can deduct up to $3,000 against ordinary income. Excess losses carry forward to future years.

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

Long-term gains are on assets held more than one year and are taxed at 0%, 15%, or 20%. Short-term gains are on assets held one year or less and are taxed as ordinary income at rates up to 37%. Long-term rates are almost always lower.

Do I have to report capital gains if they are small?

Yes, you must report all capital gains on your tax return, regardless of size. The IRS receives reports from brokers about sales you make, so unreported gains are likely to be caught. Even small gains should be included.

Can I avoid capital gains tax by donating the asset to charity?

Yes. If you donate an appreciated asset directly to a may have access to charity, you avoid the capital gains tax on the gain and can deduct the full fair market value of the asset. You cannot deduct the gain itself, but you avoid paying tax on it.

How do I know my cost basis if I inherited stock?

Inherited assets receive a "step-up in basis," meaning your cost basis is the value on the date of death, not what the original owner paid. Your broker or the estate executor should provide this value. This can significantly reduce or eliminate capital gains tax when you sell.