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

The profit itself — the difference between what you paid and what you sold it for — is called a capital gain. The federal government taxes that profit. How much you owe depends on how long you held the investment before selling it, and on your total income that year.

The tax rate is not the same for everyone. The IRS uses two categories: short-term capital gains (investments you held for one year or less) and long-term capital gains (investments you held for more than one year). Short-term gains are taxed like ordinary income — at your regular income tax rate. Long-term gains get lower rates.

Your state may also tax capital gains. Some states do not; others tax them as income. A few states have a separate capital gains tax. The amount varies by state.

Key Takeaways

  • Short-term capital gains (held one year or less) are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your income bracket.
  • Long-term capital gains (held more than one year) are taxed at 0%, 15%, or 20% depending on your total income, which is lower than short-term rates.
  • You only owe capital gains tax on the profit, not on the full amount you received when you sold.
  • State capital gains taxes vary: some states do not tax them, some tax them as income, and a few have a separate capital gains tax.
  • You report capital gains on your federal tax return; your tax preparer or software will calculate what you owe based on your specific situation.

Short-term capital gains rates

If you sell an investment you owned for one year or less, the profit is taxed as ordinary income. That means it uses the same tax brackets as your wages or salary. The rate depends on your total income for the year and your filing status (single, married filing jointly, and so on).

The federal short-term rates for 2024 range from 10% to 37%. A gain of $1,000 on a stock you held for six months might be taxed at 22% if that is your bracket, meaning you would owe $220 in federal tax on that gain. The exact rate depends on where your income falls within the brackets for your filing status.

Short-term gains are treated the same way as wages: they push your total income higher, which can move you into a higher tax bracket. This is why short-term trading can result in a larger tax bill than long-term investing.

Long-term capital gains rates

If you sell an investment you owned for more than one year, the profit gets preferential tax treatment. The federal long-term capital gains rates are 0%, 15%, or 20% — much lower than short-term rates.

Which rate you pay depends on your income level and filing status. For 2024, the 0% rate applies to single filers with income up to roughly $47,000 and married filers filing jointly with income up to roughly $94,000. The 15% rate applies to higher incomes, and the 20% rate applies to the highest earners. These income thresholds change each year.

Because long-term gains are taxed separately from ordinary income, a large gain does not automatically push you into a higher tax bracket the way short-term gains do. This is why financial advisors often recommend holding investments for at least one year before selling.

How to calculate your capital gain

Your capital gain is straightforward the sale price minus what you originally paid, minus any costs related to the sale (like broker fees). If you bought 100 shares of a stock for $50 per share ($5,000 total) and sold them for $75 per share ($7,500 total), your gain is $2,500.

If you sold at a loss — meaning you received less than you paid — that is a capital loss. You can use capital losses to offset capital gains. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against ordinary income in a single year. Any remaining loss carries forward to future years.

Keep records of what you paid for each investment, including the date you bought it and the date you sold it. Your brokerage statement will show the sale price and date. You will need these details to report the gain or loss on your tax return.

State capital gains taxes

Nine states have no income tax at all: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (which taxes only dividends and interest, not capital gains). If you live in one of these states, you owe no state capital gains tax.

Most other states tax capital gains as part of ordinary income, meaning the state rate depends on your income bracket in that state. A few states have a separate capital gains tax: California, Connecticut, Illinois, Maryland, Minnesota, New Jersey, New York, Oregon, Rhode Island, Vermont, and Washington, D.C. all have their own capital gains tax or a surtax on investment income. The rates and thresholds vary significantly.

If you moved during the year you sold an investment, you may owe tax to more than one state. The rules for which state gets to tax you depend on where you lived when you sold the investment and the specific state laws. A tax professional can help sort this out if your situation is complex.

Reporting capital gains on your tax return

You report capital gains on Schedule D of your federal tax return (Form 1040). You list each sale separately, showing the date you bought it, the date you sold it, the sale price, and your cost basis (what you paid). The form calculates your short-term and long-term totals automatically.

If you use tax software, the program will walk you through entering this information and calculate your tax liability. If you use a tax preparer, bring your brokerage statements showing all sales from the year. Many brokerages now send a summary document (Form 1099-B) that lists your sales, though you should verify the information is correct.

You do not need to do anything special when you sell the investment itself. The tax is due when you file your return, not when you sell. However, if you expect a large capital gain, you may want to make estimated tax payments during the year to avoid a big bill at tax time.

Frequently Asked Questions

Do I owe capital gains tax if I sell at a loss?

No. A loss means you sold for less than you paid, so there is no gain to tax. You can use the loss to offset other capital gains or up to $3,000 of ordinary income in the same year. Any unused loss carries forward to future years.

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

Inherited investments receive a step-up in basis, which means your cost basis is the value on the date of death, not what the original owner paid. If you sell shortly after inheriting, you likely owe little or no capital gains tax because the gain is small.

Can I avoid capital gains tax by holding an investment forever?

You avoid the tax as long as you do not sell. When you die, your heirs receive a step-up in basis, so they can sell without owing tax on the gain that occurred during your lifetime. But during your life, you owe tax only when you actually sell.

Are dividends taxed the same way as capital gains?

No. Dividends are taxed as ordinary income unless they are may have access to dividends, which get the same preferential rates as long-term capital gains. Your brokerage statement will tell you which dividends are may have access to. Most dividends from U.S. stocks are may have access to if you held the stock long enough.

What if I day trade — do I owe more tax?

Yes. Every sale is a short-term gain taxed at your ordinary income rate. If you buy and sell the same stock multiple times in a year, each transaction is taxed separately at short-term rates, which are higher than long-term rates. This is why frequent trading results in larger tax bills.