What capital gains tax is and how it applies to you

Capital gains tax is a tax on the profit you make when you sell something you own — a stock, a house, a piece of land, a business — for more than you paid for it. The difference between what you paid and what you sold it for is your gain, and that gain is taxable income. The tax rate depends on how long you held the asset and how much total income you earned that year.

The federal government taxes capital gains, and most states do too. You report capital gains on your tax return using IRS Form 8949 and Schedule D. The tax is not automatic — you only owe it when you actually sell the asset and realize the gain. If you own a stock that went up in value but you have not sold it, you owe no tax on it yet.

Key Takeaways

  • Capital gains are taxed at different rates depending on whether you held the asset for more or less than one year.
  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% depending on your total income that year.
  • Short-term capital gains (held one year or less) are taxed as ordinary income at your regular tax bracket rate, which can be as high as 37%.
  • You report capital gains on your tax return; the tax is not withheld automatically when you sell.
  • State capital gains taxes vary widely — some states have no capital gains tax, while others tax it like regular income.

Long-term versus short-term capital gains

The IRS divides capital gains into two categories based on how long you owned the asset. If you held it for more than one year before selling, it is a long-term capital gain. If you held it for one year or less, it is a short-term capital gain. This distinction matters because the tax rates are completely different.

Long-term capital gains receive preferential tax treatment. The federal tax rate is either 0%, 15%, or 20%, depending on your total taxable income for the year. Most people fall into the 15% bracket. Short-term capital gains are taxed as ordinary income at your regular tax bracket rate — the same rate you pay on wages or salary. For 2024, that rate ranges from 10% to 37% depending on your income level.

This means holding an asset for just over one year can result in a significantly lower tax bill. A stock you sell after 13 months might be taxed at 15%, while the same stock sold after 11 months would be taxed at your full ordinary income rate, potentially 24%, 32%, or higher.

Federal tax rates for 2024

Federal long-term capital gains rates for 2024 are 0%, 15%, or 20%. Which rate applies to you depends on your filing status and your total taxable income for the year, not just the capital gain itself.

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

Short-term capital gains follow the ordinary income tax brackets, which range from 10% to 37% in 2024. These brackets adjust each year for inflation. The rates shown above are current for the 2024 tax year; rates for 2025 and beyond will be announced by the IRS in late 2024.

How state capital gains taxes work

In addition to federal tax, you may owe state capital gains tax. State treatment varies widely. Some states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — have no capital gains tax at all. Other states tax capital gains as ordinary income at their regular income tax rates.

A few states have a separate capital gains tax that applies only to investment income. Washington State, for example, taxes long-term capital gains at 7% on gains over $250,000 per year. California taxes capital gains as ordinary income, so the rate depends on your income level and can be as high as 13.3%. New York taxes capital gains as ordinary income at rates up to 10.9%.

You report state capital gains on your state tax return, usually on a form similar to the federal Schedule D. If you live in a state with no capital gains tax but sold an asset in a state that does tax capital gains, you may owe tax to that state. The rules depend on where you lived when you sold the asset and where the asset was located.

What counts as a capital asset

Capital gains tax applies to most things you own for investment or personal use. This includes stocks, bonds, mutual funds, real estate, cryptocurrency, collectibles, and business interests. When you sell any of these for a profit, you have a capital gain.

Some assets receive special treatment. If you sell your primary residence, you may be able to exclude up to $250,000 of the gain from tax (or $500,000 if you are married filing jointly), provided you owned and lived in the home for at least two of the last five years. Inherited assets receive a "step-up in basis," meaning the cost basis is reset to the fair market value on the date of death, which can eliminate or reduce capital gains tax on inherited property.

Losses also matter. If you sell an asset for less than you paid for it, you have a capital loss. You can use capital losses to offset capital gains dollar-for-dollar. If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against ordinary income, and carry forward any remaining losses to future years.

How to report capital gains on your tax return

You report capital gains using IRS Form 8949 (Sales of Capital Assets) and Schedule D (Capital Gains and Losses). Form 8949 lists each transaction — the asset, the date you bought it, the date you sold it, your cost basis, the sale price, and the gain or loss. Schedule D summarizes your long-term and short-term gains and losses and calculates your net capital gain or loss for the year.

You do not need to file these forms if you have no capital gains or losses to report. If you sold assets through a brokerage, the brokerage will send you a Form 1099-B (Proceeds from Broker and Barter Exchange Transactions) showing the sale price. You will also receive a Form 1099-S if you sold real estate. These forms help you complete Form 8949 accurately.

If you owe capital gains tax, it is not withheld automatically. You pay it when you file your tax return, or you may need to make quarterly estimated tax payments if you expect to owe a large amount. Many people use tax software or work with a tax professional to calculate their capital gains tax correctly, especially if they sold multiple assets or had both gains and losses.

Frequently Asked Questions

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

No. Capital gains tax applies only when you sell the asset and realize the gain. If you own a stock, house, or other asset that has increased in value but you have not sold it, you owe no tax on the unrealized gain. You will owe tax only if and when you sell it.

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 inherited the asset, your cost basis is usually the fair market value on the date of death, not what the original owner paid.

Can I reduce my capital gains tax by selling at a loss?

Yes. If you sell an asset at a loss, you can use that loss to offset capital gains from other sales. If losses exceed gains, you can deduct up to $3,000 against ordinary income in that year and carry forward the rest to future years. This strategy is called tax-loss harvesting.

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

You report and pay capital gains tax in the year you sell the asset. You cannot defer it to a future year unless you use a specific strategy like a 1031 exchange (for real estate) or opportunity zone investment. For most sales, the tax is due when you file your return for that tax year.

What happens if I sell an asset I inherited?

If you inherited an asset and sold it shortly after, you likely owe little or no capital gains tax. Inherited assets receive a step-up in basis to the fair market value on the date of death. Your capital gain is calculated from that stepped-up basis, not from what the original owner paid. If you sold it immediately after inheriting it, there may be almost no gain at all.