What capital gains tax is and when you owe it

Capital gains tax is a tax on the profit you make when you sell an investment for more than you paid for it. The difference between what you paid and what you sold it for is your gain, and that gain is taxable income. You owe this tax only when you actually sell — not while you hold the investment, and not if the value goes down.

The IRS taxes capital gains differently depending on how long you held the investment before selling. If you held it for one year or less, it counts as a short-term capital gain and is taxed at your ordinary income tax rate. If you held it for more than one year, it counts as a long-term capital gain and is taxed at a lower rate — either 0%, 15%, or 20%, depending on your income.

Capital gains explore to stocks, bonds, real estate, cryptocurrency, art, and most other investments. They do not explore to money in a savings account or money market fund, because those are not investments that gain or lose value in the same way.

Key Takeaways

  • You owe capital gains tax only when you sell an investment for a profit, not while you own it or if it loses value.
  • Short-term gains (held one year or less) are taxed at your regular income tax rate, which can be as high as 37%.
  • Long-term gains (held more than one year) are taxed at 0%, 15%, or 20% depending on your total income for the year.
  • You report capital gains on your tax return using Form 8949 and Schedule D, and your broker sends you a Form 1099-B showing what you sold.

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

The holding period — the time between when you buy and when you sell — determines your tax rate. The IRS counts the holding period starting the day after you buy and ending the day you sell. If you buy a stock on January 15 and sell it on January 16 of the next year, you have held it for more than one year and it qualifies as a long-term gain.

Short-term gains are taxed as ordinary income. Your tax bracket for 2024 depends on your filing status and total income, and the rate can range from 10% to 37%. This means a short-term gain is taxed the same way as wages or salary.

Long-term gains have their own tax brackets that are lower than ordinary income brackets. For 2024, the long-term capital gains rates are 0% (if your income is below a certain threshold), 15% (for middle-income earners), or 20% (for high-income earners). The exact threshold depends on whether you file as single, married filing jointly, or head of household.

Because long-term rates are lower, many investors try to hold investments for at least one year before selling. However, this is a personal financial decision based on your own situation, not a tax strategy we can recommend.

How the IRS knows what you sold

When you sell an investment through a broker, the broker sends you a Form 1099-B by January 31 of the following year. This form lists every sale you made, the date you bought it, the date you sold it, what you paid, and what you sold it for. The IRS receives a copy of this form at the same time.

You use the information from Form 1099-B to fill out Form 8949 (Sales of Capital Assets), which lists each sale and calculates your gain or loss. You then transfer the totals to Schedule D (Capital Gains and Losses), which goes with your tax return. Schedule D is where you separate short-term gains from long-term gains and calculate your total.

If you sold investments through multiple brokers, you will receive a separate Form 1099-B from each one. You must report all of them, even if you only received one form or if the forms show different information than your own records.

What happens if you have a capital loss

If you sell an investment for less than you paid for it, you have a capital loss. You can use capital losses to reduce your capital gains. If your losses are larger than your gains in a given year, you can deduct up to $3,000 of the excess loss against your ordinary income (like wages). Any loss beyond $3,000 carries forward to future years and can be used to offset future gains or reduce future ordinary income.

This is why some investors sell losing positions before the end of the year — a practice called tax-loss harvesting. By realizing the loss, they can reduce their tax bill. However, there is a rule called the wash-sale rule that prevents you from buying the same or a substantially identical investment within 30 days before or after the sale. If you do, the loss is disallowed and added to the cost basis of the new purchase instead.

Capital gains in retirement accounts

If you hold investments inside a traditional IRA, Roth IRA, or 401(k), you do not owe capital gains tax when you sell them inside the account. The gains are sheltered from tax as long as the money stays in the account. This is one of the main reasons these accounts are valuable — they let your investments grow without triggering a tax bill each time you rebalance or sell.

When you withdraw money from a traditional IRA or 401(k), the entire withdrawal is taxed as ordinary income at your tax rate that year. When you withdraw from a Roth IRA, may have access to withdrawals are tax-free. But the capital gains tax itself does not explore inside these accounts.

If you hold investments in a regular taxable brokerage account (not a retirement account), you owe capital gains tax when you sell, regardless of whether you plan to spend the money or reinvest it.

State and local capital gains taxes

Some states tax capital gains as ordinary income, some tax them at a lower rate, and some do not tax them at all. Washington, for example, has a capital gains tax of 7% on long-term gains above a certain threshold, while states like Texas and Florida have no capital gains tax. Your state's tax is separate from federal tax and is calculated on your state tax return.

A few states also have local income taxes that explore to capital gains. New York City, for example, taxes capital gains as part of its local income tax. If you live in a state or city with a capital gains tax, you will owe that tax in addition to federal tax.

If you move to a different state after selling an investment, the state where you lived when you sold it is generally the one that taxes the gain. This is another reason some investors consider their state of residence when making large investment sales, though this is a personal decision based on your circumstances.

Frequently Asked Questions

Do I owe capital gains tax if I haven't sold yet?

No. Capital gains tax applies only when you sell and realize the gain. If your investment has increased in value but you still own it, you owe no tax on that unrealized gain. You can hold an investment indefinitely without owing capital gains tax, even if it doubles or triples in value.

What if I inherited an investment — do I owe capital gains tax on it?

No, and this is a significant advantage. When you inherit an investment, its cost basis is "stepped up" to its value on the date of the person's death. If the investment was worth $50,000 when the person died and you sell it for $52,000 a month later, you owe capital gains tax only on the $2,000 gain, not on the entire increase from when it was originally purchased.

Can I deduct investment losses from my taxes?

Yes, but with limits. You can use capital losses to offset capital gains dollar-for-dollar. If you have more losses than gains, you can deduct up to $3,000 of the excess against your wages or other ordinary income in that year. Any remaining loss carries forward to future years.

What if my broker made a mistake on my Form 1099-B?

Contact your broker and ask them to issue a corrected Form 1099-B. The IRS will also receive the corrected form. If you file your return before the correction arrives, you can file an amended return (Form 1040-X) once you have the correct information. Do not ignore the discrepancy — the IRS matches your return to the Form 1099-B they receive.

Are dividends the same as capital gains?

No. Dividends are payments a company makes to shareholders from its profits, and they are taxed separately. may have access to dividends (from U.S. companies held for at least 60 days) are taxed at the same long-term capital gains rates. Ordinary dividends are taxed as ordinary income. Capital gains are the profit from selling an investment for more than you paid.