You pay capital gains tax only when you sell something for more than you paid for it, and only if certain conditions are met

Capital gains tax applies to the profit you make when you sell an investment or property. If you buy stock for $1,000 and sell it for $1,500, your capital gain is $500. Whether you owe tax on that $500 depends on how long you held it, your total income that year, and what type of asset it is. You do not pay tax on the gain itself until you actually sell — just owning something that went up in value does not trigger a tax bill.

The main factor that determines whether you pay tax is holding period: how long you owned the asset before selling. Assets held for one year or less are taxed as short-term capital gains, which are taxed at your ordinary income tax rate. Assets held for more than one year are taxed as long-term capital gains, which have lower tax rates (0%, 15%, or 20% depending on your income). This difference can be substantial — a $10,000 gain might owe $3,700 in tax at ordinary rates but only $1,500 at long-term rates.

Key Takeaways

  • You owe capital gains tax only when you sell an asset for more than you paid for it, not when you own it.
  • Long-term capital gains (held over one year) are taxed at lower rates than short-term gains, so timing your sale can significantly reduce your tax bill.
  • Your total income for the year determines which tax bracket you fall into, which affects whether your rate is 0%, 15%, or 20%.
  • Some assets like primary residences and certain inherited property have exemptions or special rules that may eliminate or reduce the tax.

How holding period changes what you owe

If you sell an asset you owned for one year or less, the profit is a short-term capital gain. This is added to your regular income and taxed at your ordinary income tax rate — the same rate that applies to wages or salary. For 2024, those rates range from 10% to 37% depending on your income bracket.

If you sell an asset you owned for more than one year, the profit is a long-term capital gain. These are taxed at preferential rates: 0%, 15%, or 20%. Which rate you pay depends on your total taxable income for the year. Someone in a lower income bracket may pay 0% on long-term gains, while someone in a higher bracket pays 20%. This is why investors often hold assets longer — the tax savings can be thousands of dollars on a single sale.

The holding period starts the day after you buy and ends the day you sell. If you buy on January 15 and sell on January 16 of the next year, that is more than one year and qualifies for long-term rates. If you sell on January 15, it is short-term.

Income thresholds that determine your tax rate

Your long-term capital gains rate depends on which income bracket you fall into. For 2024, the 0% rate applies to single filers with taxable income up to $47,025 and married filers filing jointly up to $94,050. The 15% rate applies to income above those thresholds up to $518,900 (single) or $583,750 (married filing jointly). Anything above that is taxed at 20%.

These thresholds change each year for inflation. Your "taxable income" for this calculation includes wages, interest, dividends, and capital gains combined. If you have a large capital gain in one year, it can push you into a higher bracket and increase your rate on that gain. For example, if you are single with $40,000 in wages and sell an investment for a $20,000 gain, your total taxable income is $60,000 — which puts part of that gain into the 15% bracket instead of the 0% bracket.

Assets that do not trigger capital gains tax

Some types of property are exempt or partially exempt from capital gains tax. If you sell your primary residence and meet certain conditions, you can exclude up to $250,000 of gain (or $500,000 if married filing jointly) from tax. You must have owned the home for at least two of the last five years and lived in it as your main home for at least two of those years.

Inherited property receives what is called a step-up in basis. If your parent bought stock for $10,000 and it was worth $50,000 when they died, your basis becomes $50,000. If you sell it immediately for $50,000, you owe no capital gains tax, even though it was worth much less when your parent bought it. This applies to most inherited assets, though there are exceptions for certain retirement accounts and property inherited from non-U.S. citizens.

Donations to charity are not taxed as capital gains. If you donate appreciated stock to a may have access to charity, you avoid the capital gains tax entirely and can deduct the full fair market value of the donation on your tax return.

What happens if you have losses instead of gains

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 — if you have $5,000 in gains and $3,000 in losses, you report a net gain of $2,000. If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against your ordinary income. Any remaining loss carries forward to future years.

This is why some investors "harvest" losses at the end of the year — they sell losing positions to offset gains from winning positions, reducing their overall tax bill. However, there is a rule called the wash-sale rule that prevents you from buying back the same or substantially identical security within 30 days before or after the sale. If you do, the loss is disallowed.

How to report capital gains on your tax return

You report capital gains on Schedule D (Form 1040), which is filed with your federal income tax return. You list each sale separately: the date acquired, date sold, purchase price, sale price, and gain or loss. Your broker sends you a Form 1099-B after the year ends, which reports all your sales and their proceeds. You use this to fill out Schedule D.

If you have long-term and short-term gains, they are reported separately on Schedule D. The form calculates your net short-term and net long-term gains, which then flow to your main tax return. If you use tax software, it usually walks you through entering this information. If you have a complex situation — multiple properties, inherited assets, or large gains — a tax professional can help ensure you are reporting correctly and taking all available deductions.

State and local taxes on capital gains

Federal capital gains tax is only part of the picture. Most states also tax capital gains, usually at their ordinary income tax rate. A few states — Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — do not have income tax at all, so they do not tax capital gains. New York, California, and other high-tax states can add 5% to 13% to your federal bill.

Some states have special rules. California taxes capital gains at ordinary income rates with no preferential long-term rate. New York has a 3.876% surcharge on high earners' capital gains. 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, not your new state.

Frequently Asked Questions

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

No. Capital gains tax is only owed when you actually sell the asset. Owning something that has increased in value does not create a tax bill. You can hold an investment for decades and owe nothing until you sell it.

What if I sold something at a loss?

You can use losses to reduce or eliminate capital gains tax. If you have $5,000 in losses and $3,000 in gains, you report a net loss of $2,000. You can deduct up to $3,000 of losses against other income each year, and carry forward any excess to future years.

Does the capital gains rate change if I hold an asset for two years instead of one?

No. The tax rate depends on whether you held it more than one year (long-term) or one year or less (short-term). Holding it for two years, five years, or twenty years does not change the rate — it is still taxed at the long-term rate. However, holding longer can help you avoid accidentally triggering short-term rates if you sell sooner than planned.

Can I avoid capital gains tax by gifting the asset instead of selling it?

Gifting avoids capital gains tax for you, but the person who receives the gift does not get the step-up in basis that heirs do. If you gift appreciated stock to someone, they inherit your original cost basis. If they later sell it, they owe tax on the full gain from when you bought it. Heirs who inherit the asset after your death do get a step-up in basis.

What if my capital gain pushes me into a higher tax bracket?

Capital gains are added to your other income to determine your total taxable income. A large gain can push you into a higher bracket, which increases your long-term capital gains rate. For example, if a $50,000 gain moves you from the 15% bracket into the 20% bracket, the portion of the gain in the 20% bracket is taxed at that higher rate.