Capital gains tax is the tax you pay when you sell an asset for more than you paid for it

When you sell a stock, real estate, or other investment and make a profit, that profit is called a capital gain. The federal government taxes that gain at rates that depend on how long you held the asset and how much total income you earned that year. The rates change based on tax law, not on a fixed schedule, so the percentages you pay today may differ from what they were five years ago or will be five years from now.

Capital gains are taxed differently from regular income (wages, salary, interest). Most people pay a lower tax rate on long-term capital gains — assets held for more than one year — than they do on short-term gains or ordinary income. State and local taxes may also apply on top of the federal rate.

Key Takeaways

  • Long-term capital gains (assets held over one year) are taxed at 0%, 15%, or 20% federally, depending on your total income for the year.
  • Short-term capital gains (assets held one year or less) are taxed as ordinary income at rates from 10% to 37%.
  • Your tax bracket for capital gains is determined by your total taxable income, not by the size of the gain alone.
  • State and local taxes may add to your federal capital gains tax, and the amount varies by where you live and work.
  • You report capital gains on Schedule D of your federal tax return, and you must track the purchase price and sale price of each asset.

Federal long-term capital gains rates for 2024

Long-term capital gains are taxed at three federal rates: 0%, 15%, or 20%. Which rate applies to you depends on your taxable income for the year, not on the amount of the gain itself. The income thresholds that determine which bracket you fall into change each year and differ based on your filing status (single, married filing jointly, head of household, etc.).

For 2024, the 0% rate applies to single filers with taxable income up to $47,025, and married couples filing jointly with income up to $94,050. The 15% rate applies to income above those thresholds up to $518,900 (single) or $583,750 (married filing jointly). Income above those amounts is taxed at 20%. These thresholds are adjusted annually for inflation, so they will be different in 2025.

The key point: if your total taxable income for the year is low enough, you may owe no federal tax on long-term capital gains at all. If it is higher, you pay 15% or 20%. Your tax professional or the IRS website can tell you which bracket you fall into based on your specific situation.

Short-term capital gains and how they differ

Short-term capital gains — profits from assets you held for one year or less — are taxed as ordinary income. That means they are subject to the same tax rates as your wages or salary, which range from 10% to 37% depending on your income. Most people pay a higher rate on short-term gains than on long-term gains.

For example, if you are in the 24% tax bracket for ordinary income and you sell a stock you held for six months at a profit, that gain is taxed at 24%. If you had held the same stock for more than one year, the same gain might be taxed at 15% or 20% instead. The difference can be substantial on large gains.

State and local capital gains taxes

Most states do not have a separate capital gains tax. Instead, they treat capital gains as income and tax them at the same rate as wages. A few states — including California, Hawaii, Illinois, Maryland, Minnesota, New Jersey, New Mexico, New York, Oregon, Vermont, and Washington — have enacted capital gains taxes that apply on top of federal tax. These state rates vary and may apply only to gains above a certain threshold or only to certain types of assets.

Washington State, for example, has a 7% capital gains tax on long-term gains from the sale of stocks and certain other financial assets, with a $250,000 exemption per person per year. New York taxes long-term capital gains at rates from 6.85% to 10.9% depending on income. If you live in or sell property in a state with a capital gains tax, you will owe that tax in addition to the federal rate.

How to report capital gains on your tax return

You report capital gains and losses on Schedule D (Form 1040), which is part of your federal tax return. For each asset you sold, you list the date you bought it, the date you sold it, your cost basis (what you paid for it, including fees), the sale price, and the gain or loss. The IRS uses this information to determine whether the gain is long-term or short-term and to calculate your total capital gain for the year.

If you sold stocks, mutual funds, or other securities through a broker, the broker will send you a Form 1099-B showing the sales. If you sold real estate, you may receive a Form 1099-S from the title company or real estate agent. Keep records of your purchase price, purchase date, and any improvements or expenses related to the asset, because you will need these to calculate your cost basis accurately.

If your capital gains and losses are complex — for example, if you sold multiple properties or have significant losses to carry forward — a tax professional can help you complete Schedule D correctly and may identify ways to reduce your tax burden.

Capital loss carryforwards and offsetting gains

If you sell an asset at a loss, you can use that loss to offset capital gains from other sales in the same year. For example, if you sold one stock at a $5,000 gain and another at a $3,000 loss, your net capital gain for the year is $2,000, and you pay tax only on that amount.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the net loss against ordinary income (wages, salary, etc.). Any loss beyond $3,000 carries forward to future years, and you can use it to offset gains or ordinary income in those years. This carryforward has no expiration date, so you can use it whenever you have gains or income to offset.

Frequently Asked Questions

Do I owe capital gains tax if I sell my primary home?

No, if you meet the requirements. You can exclude up to $250,000 of gain ($500,000 if married filing jointly) if you owned and lived in the home as your primary residence for at least two of the five years before the sale. This exclusion applies once every two years. If your gain exceeds the exclusion amount, you owe tax on the excess.

What is my cost basis if I inherited an asset?

When you inherit an asset, your cost basis is "stepped up" to its fair market value on the date of the person's death. This means if you sell the inherited asset shortly after, you owe little or no capital gains tax, even if the original owner bought it for much less. This step-up applies to most inherited assets, including real estate and stocks.

Can I deduct investment losses from my taxes?

Yes. You can use capital losses to offset capital gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income in that year. Any remaining loss carries forward indefinitely to future years.

What happens if I sell cryptocurrency or digital assets?

Cryptocurrency and digital assets are treated as property by the IRS. When you sell them, you owe capital gains tax on the profit, calculated the same way as stocks or real estate. If you held the asset for more than one year, it is taxed at long-term rates. If less than one year, it is taxed as ordinary income.