Capital gains tax applies when you sell an asset for more than you paid for it

You owe capital gains tax on the profit when you sell a stock, bond, real estate, cryptocurrency, or other investment at a price higher than your purchase price. The tax is on the gain itself — the difference between what you paid and what you received — not on the total sale amount. If you sell something for less than you paid, you have a loss, which does not trigger a tax but may reduce taxes you owe on other gains.

The timing of when you sell matters significantly. The IRS treats gains differently depending on how long you held the asset before selling. This holding period determines whether you pay tax at your ordinary income rate or at a lower capital gains rate, and it is one of the most important factors in how much tax you actually owe.

Key Takeaways

  • Capital gains tax applies only when you sell an asset and realize a profit — simply owning an investment that goes up in value does not trigger a tax.
  • Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, which are taxed as ordinary income.
  • The tax rate on long-term gains is 0%, 15%, or 20% depending on your total income for the year, not on the gain amount alone.
  • You must report all capital gains on your tax return, even small ones, and the IRS receives records of most sales from brokers and title companies.
  • Losses from investments can offset gains and reduce your overall tax burden, though rules limit how much loss you can deduct each year.

Short-term gains are taxed as ordinary income when you hold an asset one year or less

If you buy a stock in March and sell it in August of the same year, or buy a rental property and sell it after eleven months, you have a short-term capital gain. The IRS taxes this gain at your ordinary income tax rate — the same rate you pay on your salary or wages. For 2024, that rate ranges from 10% to 37% depending on your total income and filing status.

Short-term gains add to your other income for the year, which can push you into a higher tax bracket. If you earned $60,000 in wages and have a $20,000 short-term gain, the IRS treats you as having $80,000 in income for that year. This matters because the higher your total income, the higher your tax rate on everything, including the gain.

Brokers and investment platforms report short-term sales to the IRS on Form 1099-B, so the IRS knows about the transaction. You must report it on your tax return even if the broker does not send you a form.

Long-term gains receive lower tax rates when you hold an asset over one year

If you hold an asset for more than one year before selling, your gain qualifies for long-term capital gains treatment. The tax rate is 0%, 15%, or 20% — significantly lower than ordinary income rates. Which rate applies depends on your total income for the year, not on how much you gained.

The 0% rate applies to long-term gains if your total income falls below a threshold set by the IRS each year. For 2024, single filers with income under $47,025 and married filers under $94,050 pay 0% on long-term gains. The 15% rate applies to income above those thresholds up to higher limits. The 20% rate applies to the highest earners. These thresholds change annually.

Because long-term rates are lower, many investors time their sales to cross the one-year holding mark. Selling one month before that mark means paying ordinary income rates; selling one month after means paying long-term rates. The difference can be thousands of dollars on a large gain.

Real estate sales trigger capital gains tax unless you meet the primary residence exemption

When you sell a house, land, or commercial property, capital gains tax applies to the profit. The holding period rule is the same: over one year gets long-term rates, under one year gets ordinary rates. However, the IRS allows an exemption if the property was your primary residence.

If you owned and lived in the home for at least two of the last five years before the sale, you can exclude up to $250,000 of gain from tax if you are single, or $500,000 if you are married filing jointly. This exemption applies only once every two years. If you sell a rental property or a second home, this exemption does not apply, and you owe tax on the full gain.

Real estate transactions are reported to the IRS through title companies and local tax assessors, so the IRS has records of the sale price. You will need to report the sale on your tax return and calculate your basis — what you originally paid plus the cost of improvements — to determine your actual gain.

Inherited assets receive a "step-up in basis" that can eliminate capital gains tax

When you inherit an investment or property, the IRS resets your cost basis to the fair market value on the date of the person's death. This is called a step-up in basis. If someone bought a 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 have no gain and owe no capital gains tax.

This rule applies to most inherited assets — stocks, bonds, real estate, and retirement accounts. It does not apply to inherited IRAs or 401(k)s, which have different tax rules. The step-up is automatic; you do not need to do anything to receive it, but you do need to know your stepped-up basis when you eventually sell the asset.

Cryptocurrency and digital assets are treated the same as stocks for capital gains purposes

When you sell cryptocurrency, NFTs, or other digital assets at a profit, capital gains tax applies. The holding period rule is identical: over one year qualifies for long-term rates, under one year is taxed as ordinary income. If you trade one cryptocurrency for another, that exchange counts as a sale for tax purposes, even though no dollars changed hands.

Cryptocurrency exchanges and wallet providers report transactions to the IRS on Form 1099-B or Form 1099-K, depending on the platform. You must report all gains on your tax return. Many people underreport cryptocurrency gains because they assume small transactions do not matter or because they traded frequently and lost track; the IRS has been increasing enforcement in this area.

Losses can offset gains and reduce your overall tax bill

If you sell an investment for less than you paid, you have a capital loss. You can use this loss to offset capital gains from other sales in the same year. If you sold one stock for a $5,000 gain and another for a $3,000 loss, your net gain is $2,000, and you owe tax only on that amount.

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 loss beyond $3,000 carries forward to future years and can offset gains or ordinary income in those years. This is called tax-loss harvesting, and it is a common strategy to reduce your overall tax burden.

You must hold the replacement investment for at least 30 days after the loss to claim the loss for tax purposes. If you sell a stock at a loss and buy the same or a substantially identical stock within 30 days before or after the sale, the IRS disallows the loss under the wash-sale rule.

Frequently Asked Questions

Do I owe capital gains tax if I do not sell the investment?

No. Capital gains tax applies only when you sell and realize the gain. If you own a stock that doubled in value but you do not sell it, you owe no tax on that increase. You will owe tax only if and when you sell it for a profit. This is why some investors hold appreciated assets indefinitely to defer taxes.

What if I sold an investment but have not received the money yet?

The tax applies in the year you sold, not the year you received payment. If you sold a property in December 2024 but the buyer is paying you in installments over three years, you report the gain in 2024 and owe tax then, even though you have not received all the money. You may be able to use installment sale rules to spread the gain over multiple years; consult a tax professional about your specific situation.

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

Yes. If you donate an appreciated investment directly to a may have access to charity, you avoid the capital gains tax entirely and receive a charitable deduction for the full current value. You cannot do this if you have already sold the investment; the donation must happen before the sale. This strategy works for stocks, mutual funds, and real estate but not for cash donations.

How do I know my cost basis if I inherited an investment or received it as a gift?

For inherited assets, your basis is the fair market value on the date of death. For gifts, your basis is generally what the person who gave it to you paid for it. You will need documentation — old statements, purchase confirmations, or appraisals — to prove your basis to the IRS if you are audited. If you cannot find records, you may need to hire a professional appraiser.

Do I owe capital gains tax on investment income like dividends or interest?

Dividends and interest are not capital gains; they are ordinary income taxed at your regular income tax rate. However, may have access to dividends from stocks held over 60 days receive the same lower long-term capital gains rates. Bond interest and non-may have access to dividends are always taxed as ordinary income, regardless of how long you held the investment.