Capital gains tax is the tax you owe when you sell something for more than you paid for it
When you buy an asset — a house, stock, cryptocurrency, or business — and later sell it for a higher price, the profit is called a capital gain. The government taxes that profit. The amount you owe depends on how long you held the asset, your total income that year, and which state you live in. You do not owe tax on the profit until you actually sell; simply owning something that increased in value does not trigger a tax bill.
Capital gains tax is separate from income tax. If you earn $50,000 in salary, that is taxed as ordinary income. If you sell stock you bought for $10,000 and sell it for $15,000, the $5,000 gain is taxed under capital gains rules, which often have lower rates than your regular income tax rate.
Key Takeaways
- Capital gains tax applies only to the profit when you sell an asset, not the full sale price.
- Long-term capital gains (assets held over one year) are taxed at lower federal rates than short-term gains.
- Your federal capital gains tax rate depends on your total income that year and your filing status, not just the gain itself.
- State capital gains taxes vary widely — some states have no capital gains tax, while others tax all gains as ordinary income.
The difference between long-term and short-term capital gains
The federal government taxes capital gains differently depending on how long you owned the asset. 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 — the same rate as your salary or wages. If you held it for more than one year, it is a long-term capital gain and is taxed at a lower rate.
Long-term capital gains federal tax rates are 0%, 15%, or 20%, depending on your income and filing status. Short-term gains use the ordinary income brackets, which go up to 37% at the highest level. This difference can be substantial: a $10,000 short-term gain might owe $3,700 in federal tax if you are in the top bracket, while the same $10,000 long-term gain would owe $2,000.
The holding period starts the day after you buy and ends the day you sell. If you buy stock on January 15 and sell it on January 15 the following year, that is exactly one year and qualifies for long-term treatment.
How the IRS calculates what you owe
The IRS does not tax the full sale price — only the gain. If you buy a house for $300,000 and sell it for $400,000, your capital gain is $100,000. That $100,000 is what gets taxed, not the $400,000.
Your tax rate on that gain depends on your taxable income for the year, which includes wages, investment income, and other sources. For 2024, if you are single and your taxable income is under $47,025, long-term capital gains are taxed at 0%. From $47,025 to $518,900, they are taxed at 15%. Above $518,900, they are taxed at 20%. These income thresholds change each year and differ for married filing jointly, head of household, and other filing statuses.
You report capital gains on Schedule D (Form 1040) when you file your federal tax return. You will need records showing the purchase price (called your cost basis), the sale price, and the date you bought and sold the asset.
State capital gains taxes vary widely
Federal capital gains tax is only part of the picture. Most states also tax capital gains, but the rules differ significantly. Some states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — have no capital gains tax at all. Others tax capital gains as ordinary income at their regular income tax rates, which can range from 3% to over 13% depending on the state and your income level.
A few states have adopted separate capital gains tax rates. Washington State, for example, taxes long-term capital gains on assets worth over $250,000 at a flat 7%. California taxes all capital gains as ordinary income, with rates up to 13.3% for high earners. If you live in a state with no income tax, you still owe federal capital gains tax.
Where you live when you sell matters. If you sell an asset while living in California and then move to Texas, you owe California tax on the gain. If you move before selling, you owe tax based on your new state's rules.
Special rules for real estate and primary residences
If you sell a house that is your primary residence, you may be able to exclude up to $250,000 of the gain from federal tax (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 main residence for at least two of the five years before the sale. You can use this exclusion only once every two years.
This exclusion applies only to federal tax. Most states that tax capital gains do not offer a similar exclusion for primary residences, so you may still owe state tax on the gain even if the federal gain is fully excluded.
Investment properties, vacation homes, and rental properties do not may have access to for this exclusion. All gains on those sales are taxable at the full capital gains rate.
What records you need to keep
To calculate your capital gain accurately, you need to know your cost basis — what you originally paid for the asset, plus any improvements or fees. For a house, this includes the purchase price plus the cost of major renovations (a new roof or addition), but not routine maintenance (painting or repairs). For stocks, it includes the purchase price plus any commissions you paid to buy.
Keep purchase confirmations, sale confirmations, and receipts for improvements for at least three years after you file your tax return. If you inherited an asset, your cost basis is typically the value on the date of death, not what the original owner paid — this is called a step-up in basis and can significantly reduce or eliminate capital gains tax on inherited property.
If you sold an asset through a broker or investment platform, they will send you a Form 1099-B showing the sale proceeds. You will need this document to file your tax return accurately.
How to reduce capital gains tax
You cannot avoid capital gains tax on profits, but you can manage when and how much you owe. Holding assets for more than one year before selling qualifies them for lower long-term rates. If you have both gains and losses in the same year, you can use losses to offset gains — if you sold one stock for a $5,000 gain and another for a $3,000 loss, you owe tax on only $2,000 of gain.
If your losses exceed your gains, you can deduct up to $3,000 of the net loss against your ordinary income in that year. Any remaining loss carries forward to future years. This strategy, called tax-loss harvesting, is common among investors managing their tax bills.
Donating appreciated assets to charity instead of selling them can also reduce your tax burden. You avoid the capital gains tax entirely and receive a charitable deduction for the full current value of the asset.
Frequently Asked Questions
Do I owe capital gains tax if I have not sold yet?
No. Capital gains tax applies only when you sell the asset. If you own stock worth $10,000 more than you paid, but have not sold it, you owe no tax. The tax is due in the year you actually sell.
What if I sold something at a loss?
You do not owe capital gains tax on a loss. If you bought stock for $5,000 and sold it for $3,000, you have a $2,000 capital loss. You can use this loss to offset capital gains from other sales that year, or deduct up to $3,000 against your regular income.
How do I report capital gains on my tax return?
You report capital gains on Schedule D (Form 1040) when you file your federal return. List each sale separately with the purchase date, sale date, cost basis, and sale price. If your broker sent you a Form 1099-B, attach it to your return.
Does the time of year I sell affect my capital gains tax?
The time of year does not change the tax rate, but it can affect your total income for that year. If you are close to an income threshold for long-term capital gains rates, selling in a different year might move you into a lower or higher bracket.
What happens to capital gains tax if I inherit an asset?
Inherited assets receive a step-up in basis, meaning your cost basis becomes the asset's value on the date of death, not what the original owner paid. If you inherit stock worth $50,000 that your parent bought for $10,000, your basis is $50,000, and you owe no capital gains tax if you sell it immediately at that price.