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 even a car — 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 and your total income for the year. You do not pay tax on the profit until you actually sell; simply owning something that went up in value does not trigger a tax bill.

Capital gains tax is separate from income tax on wages or salary. It is also separate from property tax, which you pay annually on real estate you own. The capital gains rate you pay can be significantly lower than your regular income tax rate, which is why the distinction matters for your tax bill.

Key Takeaways

  • Capital gains tax applies only to profit — the difference between what you paid for an asset and what you sold it for — and only when you sell it.
  • Long-term capital gains (assets held over one year) are taxed at lower federal rates than short-term gains, which are taxed as ordinary income.
  • Your total income for the year determines which tax bracket you fall into, which affects the rate you pay on long-term gains.
  • You report capital gains on Schedule D of your federal tax return, and you must track your original purchase price (called your cost basis) to calculate the gain.

The difference between long-term and short-term capital gains

The IRS divides capital gains into two categories based on how long you owned the asset. If you held it for one year or less, it is a short-term capital gain. If you held it for more than one year, it is a long-term capital gain. This distinction changes the tax rate you pay.

Short-term capital gains are taxed at your ordinary income tax rate — the same rate as your salary or wages. If you are in the 24% tax bracket, your short-term gains are taxed at 24%. Long-term capital gains have their own lower federal tax rates: 0%, 15%, or 20%, depending on your income. Most people pay 15%. The 0% rate applies only to people with very low income; the 20% rate applies only to people with very high income. This is why holding an asset longer can save you money in taxes.

How to calculate your capital gain

The calculation is straightforward: subtract what you paid for the asset from what you sold it for. The amount you paid is called your cost basis. If you bought 100 shares of stock for $50 per share ($5,000 total) and sold them for $80 per share ($8,000 total), your capital gain is $3,000.

Cost basis includes the purchase price plus any fees or commissions you paid to buy the asset. If you inherited an asset or received it as a gift, the cost basis rules are different — you may be able to use the value on the date you received it rather than what the original owner paid. Keep receipts and records of your purchase price and sale price; the IRS may ask for proof.

If you sell an asset for less than you paid for it, you have a capital loss. You can use capital losses to offset capital gains in the same year, which reduces your tax bill. If your losses exceed your gains, you can deduct up to $3,000 of the loss against your ordinary income in that year, and carry forward any remaining loss to future years.

Federal rates for long-term capital gains in 2024

Long-term capital gains are taxed at 0%, 15%, or 20% at the federal level. Which rate you pay depends on your income and filing status. The income thresholds change each year and are adjusted for inflation.

Tax RateSingle FilersMarried Filing Jointly
0%$0 to $47,025$0 to $94,050
15%$47,025 to $518,900$94,050 to $583,750
20%Over $518,900Over $583,750

These thresholds are for 2024 and will change in 2025. Your income for the year includes wages, interest, dividends, and capital gains combined. If you are near a threshold, a large capital gain could push you into a higher bracket. Some states also tax capital gains; rates and rules vary by state.

How capital gains affect your overall tax bill

Capital gains are added to your other income when the IRS calculates your total taxable income for the year. If you earned $60,000 in wages and had a $20,000 long-term capital gain, your total income is $80,000. That $80,000 determines which tax bracket you fall into and whether you owe tax on other items like investment income.

This matters because capital gains can push you into a higher tax bracket. If you are single and earned $45,000 in wages, you are in the 12% bracket. If you then realize a $10,000 long-term capital gain, your total income becomes $55,000, which may push part of your income into the 22% bracket. The capital gains themselves are still taxed at the long-term rate (0%, 15%, or 20%), but they can affect how much of your other income is taxed at a higher rate.

Reporting capital gains on your tax return

You report capital gains on Schedule D (Form 1040), which is part of your federal tax return. Schedule D asks you to list each asset you sold, the date you bought it, the date you sold it, your cost basis, your sale price, and your gain or loss. The IRS uses this information to verify that you reported the gain correctly.

If you sold stocks, mutual funds, or other securities, your broker will send you a Form 1099-B showing the sales. If you sold real estate, you may receive a Form 1099-S from the title company or real estate agent. Keep copies of these forms with your tax records. If you sold a primary residence, you may be able to exclude up to $250,000 of the gain (or $500,000 if married filing jointly) from taxation, but you must meet specific ownership and use requirements.

State and local taxes on capital gains

Most states tax capital gains as part of your regular income tax. A few states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — do not have an income tax at all, so they do not tax capital gains. Other states have their own capital gains tax separate from income tax. California, for example, taxes long-term capital gains at the same rate as ordinary income. New York has a separate capital gains tax on gains over $1 million.

If you moved to a new state during the year you sold an asset, you may owe tax to both states. The rules for which state can tax the gain depend on where you lived when you sold it and where the asset was located. Consult a tax professional if you moved or if you sold real estate in a state where you do not live.

Frequently Asked Questions

Do I owe capital gains tax if I have not sold the asset yet?

No. You only owe tax when you actually sell the asset and realize the gain. If you own stock that doubled in value but you have not sold it, you owe no tax on that gain. This is called an "unrealized" gain. Once you sell it, the gain becomes "realized" and is taxable.

What if I sold an asset at a loss?

You can use capital losses to reduce your capital gains tax. If you had $10,000 in gains and $6,000 in losses in the same year, you report a net gain of $4,000. If losses exceed gains, you can deduct up to $3,000 against your regular income. Any remaining loss carries forward to future years.

How do I know my cost basis if I inherited an asset?

Inherited assets receive a "stepped-up" cost basis, meaning your cost basis is the asset's value on the date the person died, not what they originally paid. This can significantly reduce or eliminate capital gains tax when you later sell it. Keep the estate documents showing the valuation date.

Can I avoid capital gains tax by holding an asset longer?

Holding an asset longer than one year changes the tax rate from your ordinary income rate to the lower long-term capital gains rate (0%, 15%, or 20%). This can save substantial tax, but the gain itself does not disappear. You still owe tax when you sell, just at a lower rate.

Do I report capital gains differently if I sold cryptocurrency or real estate?

The tax rules are the same: you report the gain on Schedule D and pay tax based on how long you held it. Cryptocurrency is treated as property, not currency, so gains are taxable. Real estate has additional rules — you may exclude gain on a primary residence, and you may have depreciation recapture if you rented the property. Consult a tax professional for real estate or complex asset sales.