Capital gains tax is the tax you owe when you sell something for more than you paid for it

When you buy an asset — a house, stock, rental property, or business — and later sell it for a higher price, the profit is called a capital gain. The government taxes that profit. The amount you owe depends on how long you held the asset, your total income that year, and whether you live in a state with its own capital gains tax.

You do not owe capital gains tax on the full sale price. You owe it only on the difference between what you paid (your basis) and what you sold it for (your sale price). If you bought a house for $300,000 and sold it for $400,000, your capital gain is $100,000. That $100,000 is what gets taxed, not the $400,000.

Capital gains tax is separate from income tax, though it is reported on your federal tax return. The IRS treats short-term gains (assets held one year or less) differently from long-term gains (assets held more than one year), and the rate you pay depends on which category your sale falls into.

Key Takeaways

  • Capital gains tax applies only to the profit you make when you sell an asset, not to the full sale price.
  • Long-term capital gains (assets held over one year) are taxed at lower federal rates than short-term gains, which are taxed as ordinary income.
  • Your federal capital gains rate depends on your total income that year and your filing status, with rates of 0%, 15%, or 20% for long-term gains.
  • Some states impose their own capital gains tax on top of federal tax, while others do not tax capital gains at all.
  • Certain assets like your primary home may have exemptions that let you avoid tax on part or all of your gain.

The difference between short-term and long-term capital gains

The IRS divides capital gains into two categories based on how long you owned the asset. Short-term capital gains come from assets you held for one year or less. These are taxed at your ordinary income tax rate — the same rate you pay on wages or salary. If you are in the 22% tax bracket, short-term gains are taxed at 22%.

Long-term capital gains come from assets you held for more than one year. These are taxed at lower federal rates: 0%, 15%, or 20%, depending on your income and filing status. Most people pay 15%. The 0% rate applies to lower-income filers; the 20% rate applies to higher-income filers. Because long-term rates are lower, holding an asset past the one-year mark can save you money in taxes.

The holding period starts the day after you buy the asset and ends the day you sell it. If you bought stock on March 15 and sold it on March 14 the next year, it is a short-term gain. If you sold it on March 15 or later, it is long-term.

How the federal tax rate is determined

Your long-term capital gains rate depends on your taxable income for the year and your filing status. The IRS sets income brackets each year. For 2024, the brackets for single filers are roughly: 0% rate up to $47,025 of taxable income, 15% rate from $47,025 to $518,900, and 20% rate above $518,900. Married couples filing jointly have higher brackets. These numbers change each year.

Your taxable income includes wages, interest, dividends, and capital gains all added together. If you have a large capital gain in a year when your other income is low, you might pay 0% or 15%. If you have the same gain in a year when you earned a high salary, you might pay 15% or 20%.

Short-term gains are always taxed at your ordinary income rate, which ranges from 10% to 37% depending on your total income and filing status. There is no preferential rate for short-term gains.

State capital gains taxes

In addition to federal tax, some states tax capital gains as income. Washington, Illinois, and a few others have enacted capital gains taxes in recent years, though the rules and rates vary. Some states tax all capital gains; others exempt certain types, such as gains on the sale of a primary home or retirement account withdrawals.

Many states do not tax capital gains at all. If you live in a state with no income tax — such as Texas, Florida, or Wyoming — you owe no state capital gains tax. If you live in a state with income tax but no capital gains tax — such as Pennsylvania or Ohio — capital gains are not taxed by the state, though they are still taxed federally.

If you sell an asset in a state where you do not live, the tax rules of your home state usually apply. If you move to a different state after selling an asset, your home state at the time of sale is what matters for state tax purposes.

Exemptions and special cases

The federal government allows certain capital gains to be excluded from tax entirely. The most common is the primary residence exemption. If you are single and sell a house you lived in for at least two of the last five years, you can exclude up to $250,000 of gain from federal tax. Married couples filing jointly can exclude up to $500,000. This exemption applies once every two years.

Other assets may have special treatment. Gains on certain small business stock held for more than five years may may have access to for a 50% exclusion under Section 1202 of the tax code. Inherited assets receive a step-up in basis, meaning the basis resets to the asset's value on the date of death, which can eliminate or reduce capital gains tax for the person who inherits it.

Losses can offset gains. If you sell one asset at a gain and another at a loss in the same year, you can use the loss to reduce the gain. If losses exceed gains, you can deduct up to $3,000 of net loss against ordinary income in that year, and carry forward any remaining loss to future years.

How capital gains are reported to the IRS

When you sell an asset through a broker or financial institution, they send you a form called a 1099-B (for stocks and securities) or 1099-S (for real estate). This form reports the sale price to both you and the IRS. You then report the gain or loss on Schedule D of your Form 1040 tax return.

If you sell an asset privately — for example, selling a car or collectible directly to another person — you are still required to report the gain, even if you do not receive a 1099 form. The IRS expects you to track the purchase price and sale price yourself and report the difference.

You must file your tax return and report capital gains by April 15 of the year following the sale, unless you request an extension. If you owe capital gains tax and do not pay it by the deadline, you may face penalties and interest.

Frequently Asked Questions

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

No. If you sell an asset for less than you paid for it, you have a capital loss, not a gain. You do not owe tax on a loss. You can use the loss to reduce capital gains from other sales that year, or deduct up to $3,000 against ordinary income if losses exceed gains.

What if I inherited an asset and then sold it?

Inherited assets receive a step-up in basis, meaning the IRS treats the asset's value on the date of death as your purchase price. If you inherited a house worth $500,000 and sold it for $510,000 a year later, your capital gain is only $10,000, not the full difference from what the original owner paid.

Does the capital gains rate change every year?

The federal capital gains rates (0%, 15%, 20%) stay the same, but the income brackets that determine which rate you pay adjust each year for inflation. The IRS publishes updated brackets in late 2023 for the following tax year. State capital gains taxes, where they exist, may also change.

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

Holding an asset past one year moves it from short-term to long-term status, which usually means a lower tax rate. However, you still owe tax on the gain. The only way to avoid tax entirely is through an exemption (like the primary residence exemption) or by offsetting the gain with losses from other sales.