Capital gains tax is the tax you owe when you sell an investment or asset for more than you paid for it

The difference between what you paid and what you sold it for is your capital gain. The IRS taxes that profit, and the amount depends on how long you held the asset and your income level. You report capital gains on your tax return using Schedule D (Form 1040), and you pay the tax when you file — either by April 15 or when you owe enough to make quarterly payments during the year.

Capital gains come in two types: long-term (assets held more than one year) and short-term (assets held one year or less). Long-term gains are taxed at lower rates — 0%, 15%, or 20% depending on your income. Short-term gains are taxed as ordinary income, which can be much higher. Knowing which category your sale falls into changes what you owe.

Key Takeaways

  • Long-term capital gains (held over one year) are taxed at 0%, 15%, or 20% based on your total income; short-term gains are taxed as ordinary income at your regular rate.
  • You report all capital gains and losses on Schedule D (Form 1040), which you file with your annual tax return by April 15.
  • If you owe $1,000 or more in capital gains tax, you may need to make quarterly estimated tax payments (Form 1040-ES) during the year to avoid penalties.
  • Losses from investments can offset gains dollar-for-dollar, and unused losses can carry forward to future years.
  • Selling a primary residence may let you exclude up to $250,000 (or $500,000 if married) in gains if you meet ownership and use tests.

Long-term vs. short-term capital gains and their tax rates

The holding period determines your tax rate. If you bought a stock on March 1, 2023, and sold it on March 2, 2024, that is short-term — you held it less than one year. If you sold it on March 2, 2025, it is long-term. The date that matters is the date you sold, not the date you bought.

Long-term capital gains are taxed at 0%, 15%, or 20%. Which rate you pay depends on your taxable income for the year, not the size of the gain itself. For 2024, single filers pay 0% on long-term gains up to $47,025 of taxable income, 15% from $47,025 to $518,900, and 20% above that. Married couples filing jointly have higher thresholds. These numbers change each year with inflation.

Short-term gains are taxed as ordinary income — the same rate as your wages or salary. If you are in the 24% tax bracket, a short-term gain is taxed at 24%. This is why the holding period matters so much: a $10,000 short-term gain might cost you $2,400 in tax, while a long-term gain of the same size might cost you $1,500.

How to report capital gains on Schedule D

Schedule D (Form 1040) is the form where you list every sale of stocks, bonds, real estate, or other investment property. You do not file it alone — it attaches to your Form 1040 tax return. You can file by paper or electronically through tax software or a tax preparer.

On Schedule D, you list each sale in two sections: Part I for short-term gains and Part II for long-term gains. For each sale, you enter the date you bought it, the date you sold it, the sale price, your cost basis (what you paid plus any fees), and the gain or loss. Your broker sends you a Form 1099-B showing most of this information, but you need to verify the cost basis is correct — brokers sometimes get it wrong, especially for inherited stock or reinvested dividends.

At the bottom of Schedule D, you calculate your total short-term gain or loss and your total long-term gain or loss. If you have both gains and losses, you net them together. If your losses exceed your gains, you can deduct up to $3,000 of the net loss against other income in that year. Any loss above $3,000 carries forward to future years with no time limit.

When you need to make quarterly estimated tax payments

If you expect to owe $1,000 or more in tax for the year (or $500 if you are self-employed), you should make quarterly estimated payments using Form 1040-ES. This applies to capital gains just as it does to self-employment income or rental income. The IRS charges penalties and interest if you underpay.

Quarterly payments are due April 15, June 15, September 15, and January 15 of the following year. You can pay online through the IRS website (IRS.gov), by mail, or by phone. If you use tax software or a preparer, they can help you calculate how much to pay each quarter based on your expected income and gains for the year.

You do not have to make quarterly payments if you are an employee and your employer withholds enough tax from your paycheck to cover your total tax bill for the year, including capital gains. Many people do not realize they have a capital gains tax bill until they file their return, so they pay it all at once in April rather than in quarterly installments.

Using losses to offset gains and reduce your tax bill

If you sold some investments at a loss and others at a gain in the same year, you can use the losses to reduce the gains. A $5,000 loss offsets a $5,000 gain dollar-for-dollar, leaving you with no tax on that portion. This is called netting your gains and losses.

If your losses exceed your gains, you can deduct up to $3,000 of the net loss against your wages, interest, dividends, or other income in that year. If you have a $10,000 net loss, you deduct $3,000 in the current year and carry the remaining $7,000 forward to next year. You can carry losses forward indefinitely until they are used up.

Some investors deliberately sell losing positions late in the year to offset gains — a strategy called tax-loss harvesting. However, the IRS has a rule called the wash-sale rule: if you sell a stock at a loss and buy the same stock (or a substantially identical one) within 30 days before or after the sale, the loss is disallowed. You can buy a different stock in the same sector to stay invested while respecting the rule.

Capital gains on the sale of a primary residence

If you sell your main home, you may not owe tax on part or all of the gain. The IRS lets you exclude up to $250,000 of gain if you are single, or $500,000 if you are married filing jointly. To may have access to, you must have owned the home and lived in it as your primary residence for at least two of the five years before the sale.

This exclusion applies once every two years. If you sold a home in 2022 and claimed the exclusion, you cannot claim it again until 2024. The exclusion is automatic — you do not need to file a special form, but you do need to report the sale on Form 8949 (Sales of Capital Assets) and Schedule D so the IRS knows you are claiming it.

If your gain exceeds the exclusion amount, you report the excess on Schedule D as a long-term capital gain. For example, if you are single and your gain is $400,000, you exclude $250,000 and report $150,000 as a long-term gain. Investment properties, vacation homes, and rental properties do not may have access to for this exclusion.

Special situations: inherited assets and charitable donations

When you inherit stock or real estate, you receive a stepped-up basis. This means your cost basis is the fair market value on the date of the person's death, not what they paid for it. If your parent bought a stock for $10,000 and it was worth $50,000 when they died, your basis is $50,000. If you sell it for $52,000, your gain is only $2,000, not $42,000. This can save you thousands in tax.

If you donate appreciated stock or real estate to a charity, you do not owe capital gains tax on the appreciation. You also get a charitable deduction for the full fair market value. This is more valuable than selling the asset, paying tax on the gain, and donating the proceeds. You must donate the asset itself, not the proceeds from selling it, to get this benefit.

Frequently Asked Questions

Do I have to report capital gains if I lost money on the sale?

No, you do not report a loss as a gain. However, you should still report it on Schedule D because losses can offset other gains and reduce your tax bill. If your losses exceed your gains, you can deduct up to $3,000 against other income in that year.

What if my broker's cost basis is wrong on Form 1099-B?

You can correct it when you file. Enter the correct cost basis on Schedule D and Form 8949. Keep your purchase confirmations and statements to back up your numbers. The IRS may ask for documentation if the basis on your return differs significantly from what your broker reported.

Do I owe capital gains tax on cryptocurrency or digital assets?

Yes. The IRS treats cryptocurrency, NFTs, and other digital assets as property. When you sell or trade them, you report the gain or loss on Schedule D just like stocks. Even if you trade one cryptocurrency for another without converting to dollars, that is a taxable event.

Can I avoid capital gains tax by not selling?

Yes. You only owe tax when you sell or exchange an asset. If you hold an investment that has gained value but never sell it, you owe no capital gains tax during your lifetime. However, your heirs will receive a stepped-up basis when you die, so they can sell without owing tax on the gain that occurred while you held it.

What happens if I do not report a capital gain?

The IRS receives a copy of your Form 1099-B from your broker. If you do not report the gain, the IRS will likely send you a notice and bill you for the unpaid tax plus interest and penalties. It is better to report it, even if you cannot pay the full amount — you can set up a payment plan with the IRS.