Capital gains tax is a tax on profit when you sell an asset for more than you paid for it
When you sell a stock, real estate, or other investment and make money on the sale, that profit is called a capital gain. The federal government taxes this profit at rates that depend on how long you held the asset and how much total income you earned that year. The rates are not flat — they change based on your tax bracket and whether the gain is short-term or long-term.
The federal rates for long-term capital gains (assets held over one year) are 0%, 15%, or 20%. Short-term gains (assets held one year or less) are taxed as ordinary income, which means they use your regular income tax brackets — currently 10%, 12%, 22%, 24%, 32%, 35%, or 37%, depending on your total income. Many states also add their own capital gains tax on top of the federal rate.
Key Takeaways
- Long-term capital gains use three federal rates: 0%, 15%, or 20%, determined by your income level and filing status.
- Short-term capital gains are taxed at your ordinary income tax rate, which ranges from 10% to 37% federally.
- The rate you pay depends on your total income for the year, not just the gain itself.
- Most states tax capital gains as income, adding a state tax on top of the federal rate.
- Holding an asset for more than one year usually results in a lower tax rate than selling it sooner.
How long-term capital gains rates work
If you hold an investment for more than one year before selling it, the profit qualifies as a long-term capital gain. The federal tax on this gain depends on your taxable income and filing status. For 2024, the 0% rate applies to single filers with income up to $47,025, married filers filing jointly up to $94,050, and heads of household up to $62,975. These income thresholds change each year.
The 15% rate applies to income above those thresholds up to higher limits: $518,900 for single filers, $583,750 for married filing jointly, and $551,350 for heads of household. Any long-term gain above those limits is taxed at 20%. These numbers shift annually based on inflation adjustments.
The key point is that your total income for the year determines which rate applies. If you have a $50,000 long-term gain but your other income is low, part or all of that gain may fall into the 0% bracket. If your income is high, the same gain might be taxed at 20%.
How short-term capital gains rates work
When you sell an asset you have owned for one year or less, the profit is a short-term capital gain. This gain is taxed as ordinary income, using the same tax brackets as wages or salary. For 2024, those brackets range from 10% to 37% depending on how much total income you have.
Short-term gains do not get the preferential rates that long-term gains receive. A short-term gain of $10,000 could be taxed at 24%, 32%, or higher, depending on your income level. This is why holding an investment longer than one year often results in significant tax savings.
State capital gains taxes
In addition to federal tax, most states tax capital gains as part of ordinary income. States like California, New York, and Massachusetts add their own income tax rates on top of the federal rate. For example, California's top income tax rate is 13.3%, so a long-term gain taxed at the federal 20% rate would face an additional 13.3% state tax, totaling 33.3%.
A few states have no income tax at all — including Florida, Texas, Washington, and Wyoming — so residents pay only the federal capital gains tax. Other states have flat income tax rates that explore to capital gains. Check your state's tax rules, as the state portion can significantly increase your total tax bill.
What counts as a capital asset
Capital gains tax applies when you sell stocks, bonds, mutual funds, real estate, cryptocurrency, collectibles, or other property you own. The gain is the difference between what you paid for it (your cost basis) and what you sold it for. If you inherited an asset, your cost basis is usually the value on the date of death, not what the original owner paid — this is called a "step-up in basis" and can reduce or eliminate the gain.
Some assets are treated differently. For example, if you sell a home you lived in for at least two of the last five years, you can exclude up to $250,000 of gain (or $500,000 if married filing jointly) from taxation. Collectibles like art or coins are taxed at a maximum 28% federal rate, higher than the standard long-term rate.
How to calculate your capital gains tax
Start by finding your cost basis — what you originally paid for the asset, including any fees or commissions. Subtract that from the sale price to find your gain. If the sale price is lower than your cost basis, you have a capital loss instead, which can reduce your other gains or income.
Next, determine whether the gain is short-term or long-term by counting the days you held it. If it is short-term, add it to your other income and use your ordinary tax bracket. If it is long-term, use the 0%, 15%, or 20% rate based on your total income for the year. Then add any state tax that applies in your state.
Many people use tax software or work with a tax professional to calculate this correctly, especially when they have multiple gains and losses in the same year. Losses can offset gains, potentially reducing your total tax.
Capital losses and how they offset gains
If you sell an asset for less than you paid for it, you have a capital loss. You can use this loss to reduce capital gains from other sales in the same year. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against your ordinary income (like wages). Any remaining loss carries forward to future years.
This is why some investors "harvest" losses by selling losing positions late in the year — they use the loss to offset gains elsewhere and reduce their total tax bill. However, the IRS has a "wash sale" rule that prevents you from buying back the same or substantially identical security within 30 days before or after the sale, or you lose the loss deduction.
Frequently Asked Questions
What is the difference between short-term and long-term capital gains?
Short-term gains are on assets held one year or less and are taxed as ordinary income at rates up to 37%. Long-term gains are on assets held over one year and are taxed at preferential rates of 0%, 15%, or 20%. Long-term rates are usually much lower.
Do I have to pay capital gains tax on investments I have not sold yet?
No. Capital gains tax is only owed when you actually sell the asset and realize the gain. Unrealized gains — profits on investments you still own — are not taxed. This is why some people hold investments for decades without paying tax on the growth.
Can I reduce my capital gains tax by timing when I sell?
Yes, in some cases. If you are close to a lower tax bracket threshold, waiting until next year might lower your rate. Selling losses to offset gains, or spreading sales across two years, can also reduce your tax. A tax professional can model different scenarios for your situation.
What happens to capital gains tax if I inherit an asset?
You 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 sell it shortly after inheriting it, you typically owe little or no capital gains tax, even if it had grown significantly before you inherited it.
Are cryptocurrency gains taxed the same way as stock gains?
Yes. The IRS treats cryptocurrency as property, so gains are taxed as capital gains. If you hold it over one year, you get the long-term rate. If you sell within a year, it is taxed as short-term at your ordinary income rate. Staking rewards and mining are taxed as ordinary income when received.