Capital gains tax exists at both the federal and state level, and you may owe both

When you sell an asset for a profit, the federal government taxes that gain through the Internal Revenue Service (IRS). Most states also tax capital gains, though a handful do not. The federal tax rate depends on how long you held the asset and your total income for the year. State rates vary widely — some states charge a flat percentage, others tie it to your income bracket, and a few states do not tax capital gains at all.

You file both taxes on the same sale, but on different forms and to different agencies. The federal portion goes on your Form 1040 and Schedule D when you file with the IRS. The state portion goes on your state income tax return, which each state administers separately. If you owe both, you pay both — they do not offset each other.

Key Takeaways

  • The IRS collects federal capital gains tax on all U.S. residents, and most states collect their own capital gains tax on top of that.
  • Federal rates are 0%, 15%, or 20% depending on how long you held the asset and your income; state rates range from 0% to over 13% depending on where you live.
  • You report federal gains on Schedule D of your Form 1040; you report state gains on your state income tax return.
  • Five states (Alaska, Florida, Nevada, South Dakota, and Texas) do not tax capital gains, but you still owe federal tax if you live there.

How federal capital gains tax works

The IRS taxes capital gains at different rates depending on how long you owned the asset before selling it. If you held it for one year or less, it is taxed as short-term capital gain at your ordinary income tax rate — the same rate as wages or salary. If you held it for more than one year, it is taxed as long-term capital gain at a preferential rate: 0%, 15%, or 20%, depending on your total taxable income for the year.

The income thresholds for long-term rates change each year. For 2024, the 15% rate applies to most people; the 0% rate applies only to lower-income filers; and the 20% rate applies to high-income filers. The IRS publishes updated brackets each January. You report all capital gains and losses on Schedule D, which attaches to your Form 1040 federal return.

The federal government also allows you to deduct capital losses against capital gains. If you sell an investment at a loss, you can use that loss to reduce the tax on gains from other sales. If losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income in that year, and carry forward any remaining loss to future years.

How state capital gains tax works

Most states tax capital gains as part of their state income tax system. Some states use a flat rate — for example, Illinois taxes all capital gains at 4.95%, regardless of your income. Other states use progressive brackets, meaning the rate increases as your income rises, similar to federal brackets. A few states tax only certain types of gains, such as gains on the sale of real estate or business interests.

Five states — Alaska, Florida, Nevada, South Dakota, and Texas — do not tax capital gains at all. If you live in one of these states, you owe no state capital gains tax. However, you still owe federal tax. Washington state and New Hampshire have recently enacted capital gains taxes on certain high-value sales, though the rules differ from traditional income tax.

You report state capital gains on your state income tax return, which you file separately from your federal return. Some states allow you to deduct capital losses the same way the federal government does; others have different rules. Check your state's tax authority website or a state-specific tax guide for the exact rules in your state.

The difference between federal and state tax on the same sale

A single stock sale can trigger both federal and state tax bills. Suppose you live in California, bought a stock for $10,000, and sold it for $15,000 after holding it for two years. Your long-term capital gain is $5,000. The federal government taxes this at 15% (assuming you are in that bracket), so you owe $750 in federal tax. California taxes capital gains as ordinary income at rates up to 13.3%, so you owe additional state tax on the same $5,000 gain.

The two taxes are independent. The federal government does not reduce your federal tax because you owe state tax, and the state does not reduce state tax because you owe federal tax. You calculate and pay each separately. Some states offer a credit for taxes paid to other states if you moved or earned income in multiple states, but this is rare for capital gains and applies only in specific situations.

Which states do not tax capital gains

Alaska, Florida, Nevada, South Dakota, and Texas have no capital gains tax. Wyoming also has no capital gains tax. If you live in one of these states, you owe no state tax on investment gains, though you still owe federal tax to the IRS.

Some people move to these states specifically to avoid state capital gains tax, but residency rules matter. Most states consider you a resident if you spend more than half the year there or maintain a permanent home there. Simply owning property or having a mailing address in a no-tax state does not make you a resident for tax purposes. If you are considering a move for tax reasons, consult a tax professional about your specific situation, because the IRS and state tax authorities scrutinize residency claims closely.

How to report capital gains on your tax return

For federal taxes, you report all capital gains and losses on Schedule D, which is part of your Form 1040. You list each sale separately: the date you bought it, the date you sold it, the purchase price, the sale price, and the gain or loss. Schedule D also calculates your net long-term and short-term gains or losses for the year. This total then transfers to your Form 1040.

If you have many sales, you may also file Form 8949 (Sales of Capital Assets), which provides more space and detail. Your tax software or tax preparer will guide you through this. For state taxes, you report capital gains on your state income tax return, which varies by state. Some states have a separate schedule similar to Schedule D; others integrate capital gains directly into the main return.

Keep records of every purchase and sale: the date, price, and any fees or commissions. If you inherited an asset, the cost basis is typically the value on the date of death, not what the original owner paid — this can significantly reduce your taxable gain. Brokerage statements and investment account records usually provide this information automatically.

Frequently Asked Questions

Do I owe both federal and state capital gains tax on the same sale?

Yes, if you live in a state that taxes capital gains. You owe federal tax to the IRS and state tax to your state tax authority. The two are separate; neither reduces the other. If you live in Alaska, Florida, Nevada, South Dakota, Texas, or Wyoming, you owe only federal tax.

What if I sold an investment at a loss?

You can use capital losses to offset capital gains. If losses exceed gains, you can deduct up to $3,000 of the excess against ordinary income in that year. Any remaining loss carries forward to future years. State rules vary, so check your state's tax authority for details.

How do I know if I owe long-term or short-term capital gains tax?

If you held the asset for more than one year before selling, it is long-term and taxed at the preferential federal rate (0%, 15%, or 20%). If you held it for one year or less, it is short-term and taxed as ordinary income at your regular tax rate. The holding period starts the day after you buy and ends the day you sell.

Can I deduct state capital gains tax from my federal return?

You can deduct state income taxes (including state capital gains tax) as part of the state and local taxes (SALT) deduction on your federal return, but only up to $10,000 per year. This deduction applies only if you itemize deductions rather than taking the standard deduction. Most taxpayers take the standard deduction, so this deduction does not help them.

What if I moved to a different state after selling an investment?

You owe capital gains tax to the state where you were a resident when you sold the asset, not where you live now. Residency is typically determined by where you spent most of the year or where you maintained a permanent home. If you moved mid-year, you may owe tax to both states, though some states offer credits to avoid double taxation. Consult a tax professional if this applies to you.