Capital gains tax is a tax on the profit you make when you sell an asset for more than you paid for it

When you sell a stock, real estate, cryptocurrency, or other investment and make a profit, the federal government taxes that profit as capital gains. The tax rate depends on how long you held the asset and your total income for the year. You do not pay capital gains tax on the full sale price — only on the difference between what you paid and what you sold it for.

Capital gains tax is separate from income tax on wages or salary. The IRS treats investment profits differently because they want to encourage long-term investing. If you hold an asset for more than one year before selling, you pay a lower tax rate than if you sell it quickly.

State and local governments may also tax capital gains. Some states have no capital gains tax at all, while others tax it like regular income. The federal rate is what applies everywhere, but your total tax bill depends on where you live.

Key Takeaways

  • Capital gains tax applies only to profit — the amount you sold an asset for minus what you originally paid for it.
  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% depending on your income; short-term gains are taxed as ordinary income.
  • Your filing status and total income for the year determine which tax bracket you fall into.
  • You report capital gains on Schedule D of your tax return, and the IRS matches it against your brokerage records.

Long-term versus short-term capital gains rates

The IRS divides capital gains into two categories based on how long you owned the asset. Long-term capital gains apply when you hold an asset for more than one year before selling. Short-term capital gains apply when you sell within one year or less.

Short-term gains are taxed at your ordinary income tax rate, which can be as high as 37% at the federal level. Long-term gains are taxed at lower rates: 0%, 15%, or 20%, depending on your income bracket for the year. Because long-term rates are lower, many investors time their sales to cross the one-year mark before selling.

The long-term rate you pay depends on your filing status and your total taxable income for the year. A single filer in 2024 pays 0% on long-term gains up to $47,025 of income, 15% from $47,025 to $518,900, and 20% above that. These income thresholds change each year and differ for married filing jointly, head of household, and other filing statuses.

How the IRS calculates your capital gains tax

The IRS does not calculate your capital gains tax for you. You report the sale on Schedule D of your tax return, listing the asset, the date you bought it, the date you sold it, what you paid, what you sold it for, and the profit or loss. Your brokerage firm sends you a Form 1099-B showing all your sales for the year, and the IRS receives a copy too.

If you sold multiple assets, you add up all the long-term gains and all the short-term gains separately. Long-term losses can offset long-term gains, and short-term losses can offset short-term gains. If you have more losses than gains in a category, you can use up to $3,000 of the excess loss to reduce your ordinary income that year, and carry the rest forward to future years.

Your total capital gains (after losses) get added to your other income — wages, interest, dividends — to determine your tax bracket. This matters because capital gains tax brackets are stacked on top of your other income. If you earn $50,000 in wages and have $30,000 in long-term gains, you are taxed on $80,000 total, which may push you into a higher bracket.

What counts as a capital asset

Capital gains tax applies to most things you own and sell for a profit: stocks, bonds, mutual funds, real estate, cryptocurrency, collectibles, and business interests. The holding period starts the day after you buy and ends the day you sell.

Some assets have special rules. If you sell your primary residence, you can exclude up to $250,000 of gain if you are single, or $500,000 if married filing jointly, as long as you owned and lived in the home for at least two of the last five years. Inherited assets get a "step-up in basis," meaning the cost basis resets to the fair market value on the date of death, so you owe no tax on gains that happened before you inherited it.

Losses on personal property — like a car or furniture — do not count as capital losses and cannot offset gains. Losses only count if the asset was held for investment or business purposes.

State and local capital gains taxes

Twelve states currently tax capital gains at the state level: California, Connecticut, Delaware, Illinois, Iowa, Maryland, Minnesota, Missouri, Montana, New Jersey, New York, and Oregon. Most of these states tax capital gains as ordinary income, meaning the rate depends on your state income tax bracket. A few states have separate capital gains tax rates.

Washington State and Colorado have capital gains taxes that apply only to long-term gains above a certain threshold. Washington taxes long-term gains over $250,000 at 7%. Colorado taxes long-term gains at 4.63%, but only on gains from the sale of certain securities, not real estate.

If you live in a state with no income tax — such as Florida, Texas, or Wyoming — you owe no state capital gains tax. If you move to a different state after selling an asset, the state where you lived when you sold it is generally the one that taxes the gain.

When you owe capital gains tax

You owe capital gains tax in the year you sell the asset, not when you buy it or hold it. If you sell a stock in December 2024, you report the gain on your 2024 tax return, due in April 2025. If you have not sold yet, you owe nothing, even if the asset has increased in value.

If you sell an asset at a loss, you do not owe capital gains tax — but you may be able to use the loss to reduce your taxes. Losses can offset gains dollar-for-dollar. If you have more losses than gains, you can deduct up to $3,000 of the excess against your wages or other income in that year.

If you receive a distribution from a mutual fund or exchange-traded fund (ETF), you may owe capital gains tax even if you did not sell the fund yourself. The fund manager sells securities inside the fund, and the fund passes the gains to you. This is called a "capital gains distribution," and you report it on your tax return the year you receive it.

How to report capital gains on your tax return

You report capital gains on Schedule D (Form 1040), which lists each sale separately. You enter the date acquired, date sold, sales price, cost basis (what you paid), and gain or loss. If you have many sales, you may attach a separate statement listing them all.

Your brokerage sends you Form 1099-B in January or February showing all your sales from the previous year. Use this form to fill out Schedule D. The IRS also receives a copy of the 1099-B, so your numbers must match or the IRS will send you a notice.

After you complete Schedule D, you transfer the totals to your main tax return (Form 1040). Long-term and short-term gains are reported separately because they are taxed differently. If you use tax software, it usually walks you through the process and calculates the tax for you.

Frequently Asked Questions

Do I owe capital gains tax if I have not sold yet?

No. Capital gains tax is only owed when you sell an asset. Unrealized gains — increases in value while you still own it — are not taxed. You can hold an asset indefinitely and owe nothing until you sell.

What is the difference between cost basis and sale price?

Cost basis is what you paid for the asset, including any fees or commissions. Sale price is what you sold it for. The difference is your capital gain or loss. If you paid $10,000 and sold for $15,000, your gain is $5,000.

Can I reduce my 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 capital gains tax on the gain and can deduct the fair market value of the asset as a charitable contribution. You must own the asset long-term for this to work.

What happens if I inherit an asset that has gone up in value?

You receive a "step-up in basis," meaning your cost basis becomes the fair market value on the date of death. If the asset was worth $100,000 when you inherited it and you sell it for $105,000, you owe tax only on the $5,000 gain, not on any gains that happened before you inherited it.

Do I have to pay capital gains tax if I reinvest the money?

Yes. The IRS taxes the gain when you sell, regardless of what you do with the money afterward. Reinvesting does not defer or eliminate the tax. You owe it in the year of the sale.