Capital gains tax is both federal and state, and you may owe both
When you sell an investment and make a profit, the federal government taxes that gain through the Internal Revenue Service (IRS). Most states also tax capital gains, though the rate and rules vary by state. You do not automatically owe one or the other — in most cases, you owe federal tax plus your state's tax, and you report both on separate forms when you file.
The amount you owe depends on how long you held the investment, your total income for the year, and which state you live in. A gain you hold for more than one year gets taxed at the federal long-term rate, which is lower than the short-term rate. Your state may have its own holding period rules or may tax all gains the same way.
Key Takeaways
- Federal capital gains tax is collected by the IRS and applies to all taxpayers, with long-term gains taxed at 0%, 15%, or 20% depending on your income.
- State capital gains tax varies: some states do not tax capital gains at all, some tax them as ordinary income, and a few have separate capital gains rates.
- You report federal gains on Schedule D (Form 1040) and state gains on your state tax return, which may be a different form or schedule.
- Your state of residence on December 31 of the tax year determines which state tax you owe, not the state where you bought or sold the investment.
- If you move to a different state after selling an investment, you may still owe tax to your old state if you were a resident when you made the sale.
How federal capital gains tax works
The IRS taxes capital gains through the federal income tax system. The tax rate depends on how long you held the asset before selling it. If you held it for one year or less, it is a short-term capital gain and is taxed at your ordinary income tax rate (10%, 12%, 22%, 24%, 32%, 35%, or 37%, depending on your income bracket). If you held it for more than one year, it is a long-term capital gain and is taxed at a lower rate: 0%, 15%, or 20%.
You report federal capital gains on Schedule D, which you attach to your Form 1040 when you file with the IRS. Schedule D asks you to list each sale separately, including the date you bought it, the date you sold it, the sale price, and your cost basis (what you paid for it). The IRS uses this information to calculate whether the gain is short-term or long-term and to add it to your other income for the year.
The federal tax applies to all U.S. citizens and residents, regardless of where they live. If you are a U.S. citizen living abroad, you still owe federal capital gains tax on worldwide gains, though you may be able to exclude some foreign income under other rules.
State capital gains tax: what varies by location
State treatment of capital gains differs widely. Nine states do not tax capital gains at all: Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire (though New Hampshire taxes only dividends and interest, not gains from selling stocks or real estate). The remaining 41 states and Washington, D.C. tax capital gains in some form.
Most states that tax capital gains treat them as ordinary income and tax them at the same rate as wages or salary. A few states have separate capital gains tax rates. California, for example, taxes long-term capital gains as ordinary income but at rates up to 13.3%. Washington state has a capital gains tax of 7% on long-term gains above a certain threshold, separate from its income tax. Oregon taxes capital gains as ordinary income at rates up to 9.9%.
Some states offer breaks for long-term gains. A handful of states tax long-term gains at a lower rate than short-term gains, similar to the federal system. Check your state's tax authority website or a tax professional to learn your state's specific rules, because the rates and thresholds change year to year.
How to report capital gains on your state return
You report state capital gains on your state income tax return, not on a federal form. The form varies by state. Some states use a schedule similar to the federal Schedule D. Others ask you to report the total gain on the main return form. A few states that tax capital gains do not require you to itemize each sale — you can report the total gain from all sales for the year.
Most states that tax capital gains require you to file a state return only if your income exceeds a certain threshold. If you had capital gains but your total income is below that threshold, you may not owe state tax even though you owe federal tax. Check your state's filing requirements before assuming you need to file.
If you sold investments in multiple states during the year, you may owe tax to more than one state. Your state of residence on December 31 of the tax year is your primary state for tax purposes. However, if you sold real estate or had business income in another state, that state may also claim tax on the gain. Some states have agreements to avoid double taxation, but you should consult a tax professional if you have income from multiple states.
The difference between federal and state rates
Federal long-term capital gains rates (0%, 15%, or 20%) are lower than most state rates. This means your total tax bill on a gain is usually the federal rate plus your state rate. For example, if you have a long-term gain and fall into the 15% federal bracket, and you live in a state that taxes capital gains at 5%, your total tax is 20%.
The federal rate you pay depends on your total taxable income for the year, not just the gain itself. If you have a large gain that pushes you into a higher income bracket, your federal rate on that gain may jump from 15% to 20%. Your state rate may work the same way, or your state may have a flat rate that applies to all capital gains regardless of income.
Short-term gains are taxed at your ordinary income rate federally, which is higher. If you are in the 24% federal bracket and have a short-term gain, that gain is taxed at 24% federally, plus your state rate on top of that. This is why holding an investment for more than one year often results in lower total tax.
What happens if you move to a different state
Your state of residence on December 31 determines which state taxes your capital gains for that year. If you sold an investment while living in State A and then moved to State B before the end of the year, State A taxes the gain, not State B.
If you sell an investment in one state and move to another state after the sale, you may still owe tax to the state where you lived when you made the sale. Some states have rules that allow them to tax gains on property located in that state even after you move away. Real estate is the most common example: if you sold a rental property in State A and then moved to State B, State A may still tax the gain on that property.
If you move from a state that taxes capital gains to a state that does not, you will no longer owe state capital gains tax on future gains. However, you will still owe federal tax. If you move from a state that does not tax capital gains to a state that does, you will owe state tax on future gains in addition to federal tax.
Capital gains on real estate versus investments
Capital gains tax applies to the sale of real estate, stocks, bonds, mutual funds, and other assets. The federal rules are the same regardless of asset type: long-term gains are taxed at 0%, 15%, or 20%, and short-term gains are taxed at ordinary income rates.
State rules may differ for real estate. Some states tax gains on the sale of your primary home differently than gains on investment property or stocks. A few states exempt or reduce tax on gains from selling your main residence if you meet certain conditions. Check your state's rules if you sold a home, because the state treatment may not match the federal treatment.
The federal government also has a primary residence exclusion: if you sold your main home and meet the ownership and use tests, you can exclude up to $250,000 of gain (or $500,000 if married filing jointly) from federal tax. This exclusion does not automatically explore to state tax, so you may owe state tax on a gain that is not taxed federally.
Frequently Asked Questions
Do I owe capital gains tax if I sell an investment at a loss?
No, you do not owe tax on a 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 that year, and carry forward any remaining loss to future years.
What if I inherited an investment — do I owe capital gains tax when I sell it?
You owe capital gains tax on the gain from the date you inherited it to the date you sold it. However, inherited assets receive a "step-up in basis," meaning your cost basis is the value on the date of death, not what the original owner paid. This usually results in little or no gain if you sell soon after inheriting.
Do I owe capital gains tax on cryptocurrency or digital assets?
Yes. The IRS treats cryptocurrency as property, not currency. When you sell or exchange crypto, any gain is subject to federal capital gains tax. State tax applies the same way as with other investments. You report it on Schedule D.
Can I avoid capital gains tax by not selling?
Yes. You owe capital gains tax only when you sell or exchange an asset. If you hold an investment and it increases in value but you do not sell, you owe no tax on the unrealized gain. You will owe tax only when you eventually sell or give it away.
What if I live in a state with no capital gains tax but work in a state that has one?
You owe capital gains tax to your state of residence, not your state of employment. If you live in a no-tax state and work in a state that taxes capital gains, you do not owe that state's capital gains tax on your investment sales. However, you may owe that state's income tax on wages you earned there.