Capital gains are taxed differently depending on how long you held the asset

A capital gain is the profit you make when you sell something for more than you paid for it — a stock, a house, a piece of art, cryptocurrency, or land. The tax you owe on that profit depends almost entirely on one thing: how long you owned it before you sold it.

If you held the asset for one year or less, it is taxed as short-term capital gains, which means it gets taxed at your ordinary income tax rate — the same rate as your salary or wages. If you held it for more than one year, it is taxed as long-term capital gains, which has its own lower tax brackets: 0%, 15%, or 20%, depending on your total income for the year.

The difference matters. A person in the 24% income tax bracket who sells a stock they held for eight months owes tax at 24%. The same person selling a stock they held for 14 months owes tax at 15%. That is a significant difference on a large gain.

Key Takeaways

  • Short-term capital gains (assets held one year or less) are taxed at your regular income tax rate, which can be as high as 37%.
  • Long-term capital gains (assets held more than one year) are taxed at lower rates: 0%, 15%, or 20%, based on your income level.
  • The IRS counts the holding period from the day after you buy to the day you sell; one year and one day qualifies as long-term.
  • You only owe tax on gains you actually realize by selling; increases in value while you still own the asset are not taxed until you sell.
  • Losses from selling assets can offset gains dollar-for-dollar, and excess losses can reduce other income by up to $3,000 per year.

How the IRS counts the time you held an asset

The holding period starts the day after you purchase the asset and ends on the day you sell it. This matters because you need more than 12 months to may have access to for long-term treatment — exactly one year is not enough. If you buy a stock on January 15 and sell it on January 15 the next year, that is short-term. If you sell it on January 16, that is long-term.

The IRS uses a specific rule called the "holding period rule" that applies to most securities and property. For stocks and mutual funds, the date that matters is the settlement date, not the trade date — the day the transaction officially clears, which is typically two business days after you place the order. When you sell, the settlement date is also what counts.

If you inherited an asset, the holding period rules are different: inherited property gets what is called a "stepped-up basis," which means your holding period starts fresh on the date of death, and you automatically may have access to for long-term treatment regardless of how long the person who left it to you held it.

Long-term capital gains tax rates and income thresholds

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 size of the gain itself. The income thresholds change every year because they are adjusted for inflation.

For 2024, here is how the brackets work for single filers: the 0% rate applies if your taxable income is $47,025 or less; the 15% rate applies to income between $47,026 and $518,900; and the 20% rate applies to income above $518,900. For married couples filing jointly, the thresholds are higher: 0% up to $94,050, 15% from $94,051 to $583,750, and 20% above that. These numbers shift upward each year.

The practical effect is that you might owe 0% federal tax on a long-term gain if your total income for the year is low enough, even if the gain itself is substantial. A retired person with $30,000 in Social Security and a $20,000 long-term capital gain from selling stock would owe no federal tax on the gain because their total income stays under the 0% threshold.

Short-term capital gains and ordinary income tax rates

Short-term capital gains are taxed as ordinary income, which means they are added to your wages, salary, and other income and taxed at whatever bracket that total income puts you in. For 2024, the federal income tax brackets range from 10% to 37%, depending on how much you earn.

This is why the holding period matters so much. A person in the 32% tax bracket who sells a stock for a $10,000 gain after holding it for six months owes $3,200 in federal tax on that gain. If they had held the same stock for 13 months and sold it for the same $10,000 gain, they would owe $1,500 (at the 15% long-term rate), assuming their income stays in the same range.

Short-term gains are also subject to the Net Investment Income Tax (NIIT) of 3.8% if your modified adjusted gross income exceeds certain thresholds: $200,000 for single filers and $250,000 for married couples filing jointly. Long-term gains can also trigger this tax, but it applies to fewer people because the income thresholds are high.

State and local taxes on capital gains

Most states tax capital gains as ordinary income, meaning they add the gain to your other income and tax it at your state income tax rate. A few states have no income tax at all (Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming), so residents of those states owe no state tax on capital gains.

A small number of states have special capital gains taxes separate from income tax. Washington State, for example, has a 7% capital gains tax on long-term gains from the sale of stocks and certain other securities, but not on real estate or most other assets. California taxes capital gains as ordinary income at rates up to 13.3%, making it one of the highest in the country.

Some cities also impose local income taxes that explore to capital gains. New York City, for instance, taxes capital gains as part of its local income tax. When you sell an asset, you may owe federal tax, state tax, and local tax all at once, so it is worth checking what your state and city charge before you sell a large position.

Using losses to reduce your capital gains tax

If you sell an asset for less than you paid for it, you have a capital loss. The IRS lets you use capital losses to offset capital gains dollar-for-dollar. If you had $15,000 in long-term gains and $8,000 in short-term losses during the same year, you would owe tax on only $7,000 of gain.

If your losses exceed your gains, you can use up to $3,000 of the excess loss to reduce other income — wages, salary, interest, dividends, and so on. Any loss beyond that $3,000 carries forward to future years, and you can use it to offset future gains or reduce future income by another $3,000 per year until the loss is exhausted.

This strategy is called tax-loss harvesting: selling a losing position specifically to lock in a loss that can offset gains elsewhere in your portfolio. Many investors do this in December to reduce their tax bill for the year. The IRS has a rule called the "wash-sale rule" that prevents you from buying back the same security within 30 days before or after the sale, or the loss does not count — but you can buy a similar security when ready.

Capital gains on real estate and primary residences

If you sell a house that is your primary residence, you may not owe any tax on the gain at all. The IRS lets you exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly, as long as you meet two conditions: you owned the home for at least two of the five years before the sale, and you lived in it as your main home for at least two of those five years.

This exclusion is generous and applies once every two years. A married couple who bought a house for $300,000, lived in it for three years, and sold it for $750,000 would owe tax on only $250,000 of the $450,000 gain (the amount over the $500,000 exclusion). The remaining $250,000 gain is tax-free.

Investment properties and rental homes do not may have access to for this exclusion. If you sell a rental property for a gain, the entire gain is subject to capital gains tax. Additionally, rental properties are subject to a tax called "depreciation recapture," which requires you to pay tax at a 25% rate on the portion of the gain that came from depreciation deductions you claimed while you owned the property.

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 and realize the gain. If a stock you own has doubled in value but you still hold it, you owe no tax. The tax is triggered only by the sale itself. This is why timing the sale can matter for tax planning.

What if I sold an asset at a loss — can I deduct it?

Yes, but only against capital gains or up to $3,000 of other income per year. If you sold a stock for a $5,000 loss and had no capital gains that year, you can deduct $3,000 against your wages or other income, and carry the remaining $2,000 forward to future years. Losses cannot create a refund; they only reduce what you owe.

How do I know if my gain is long-term or short-term?

Count from the day after you bought to the day you sold. If that span is more than 12 months, it is long-term. Your brokerage statement or tax software will usually calculate this for you and label each sale as short-term or long-term. When in doubt, assume it is short-term unless you are certain it has been more than a year.

Do I have to report small capital gains to the IRS?

Yes. The IRS requires you to report all capital gains, no matter how small. Your brokerage sends you a Form 1099-B listing every sale, and the IRS receives a copy. Even a $50 gain must be reported on your tax return. Failing to report is considered tax evasion.

Can I reduce my capital gains tax by donating the asset to charity instead of selling it?

Yes, and it is often better than selling. If you donate appreciated stock or property directly to a may have access to charity, you avoid the capital gains tax entirely and also get a charitable deduction for the full fair-market value of the asset. You must own it for more than one year for this to work, and the asset must go directly to the charity, not through you.