What capital gains tax is and when you owe it

Capital gains tax is a tax on the profit you make when you sell an investment or asset for more than you paid for it. The difference between what you paid and what you sold it for is your gain — and that gain is what gets taxed, not the full sale price.

You owe capital gains tax when you sell stocks, bonds, real estate, cryptocurrency, collectibles, or other assets you own. The tax applies only to the profit. If you buy a stock for $1,000 and sell it for $1,500, your capital gain is $500, and that $500 is what the IRS taxes — not the $1,500.

You do not owe capital gains tax on assets you still own, even if they have gone up in value. The tax triggers only when you sell and lock in the gain.

Key Takeaways

  • Capital gains tax applies only to the profit you make on a sale, calculated as the sale price minus what you originally paid.
  • Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, which use your ordinary income tax rate.
  • Your capital gains tax rate depends on your total income for the year and your filing status, not on the type of asset sold.
  • You report capital gains on Schedule D of your tax return, and the IRS matches sales reported by your broker.

Long-term versus short-term capital gains rates

The IRS taxes capital gains at two different rates depending on how long you held the asset. If you held it for more than one year before selling, it is a long-term capital gain and gets a lower tax rate. 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 you pay on wages or salary.

Long-term capital gains rates are 0%, 15%, or 20%, depending on your income and filing status. Short-term gains use your regular tax bracket, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37%. For most people, long-term rates are significantly lower.

The holding period starts the day after you buy and ends the day you sell. If you buy on January 15 and sell on January 16 of the next year, you have held it more than one year and may have access to for long-term treatment.

How your income level affects your capital gains tax rate

Your capital gains tax rate is not fixed — it depends on your total taxable income for the year and whether you file as single, married filing jointly, head of household, or another status. The IRS sets income thresholds that change each year.

For 2024, if you are single and your taxable income (including capital gains) falls below roughly $47,000, your long-term capital gains are taxed at 0%. Between roughly $47,000 and $518,000, they are taxed at 15%. Above $518,000, they are taxed at 20%. These thresholds are higher for married couples filing jointly and different for other filing statuses.

This means you can sometimes control your tax rate by timing when you sell. If you are near a threshold, selling in a year when your other income is lower might push your gains into a lower bracket. A tax professional can model this for your situation.

Calculating your capital gain or loss

Your capital gain is the sale price minus your cost basis — the original price you paid plus any fees or commissions. If you bought 100 shares at $10 per share and paid a $25 commission, your cost basis is $1,025 ($1,000 + $25). If you sell those shares for $1,500, your gain is $475 ($1,500 − $1,025).

If you sell for less than you paid, you have a capital loss. Capital losses can offset capital gains dollar-for-dollar. If you have $5,000 in gains and $2,000 in losses, you report a net gain of $3,000. If losses exceed gains, you can deduct up to $3,000 of the excess loss against other income in that year, and carry forward any remaining loss to future years.

For inherited assets, the cost basis is reset to the market value on the date of death, not the original purchase price. This is called a step-up in basis and can eliminate capital gains tax on assets that appreciated during the original owner's lifetime.

Reporting capital gains on your tax return

You report capital gains on Schedule D (Capital Gains and Losses), which attaches to your Form 1040. You list each sale separately: the asset, the date bought, the date sold, the cost basis, the sale price, and the gain or loss.

Your broker sends you a Form 1099-B after the year ends, listing all the sales they handled. The IRS receives a copy of this form, so they know what you sold and for how much. If your Schedule D does not match the 1099-B, the IRS will notice and may send you a notice.

If you sold assets through multiple brokers or held some assets outside a brokerage account, you are responsible for tracking and reporting all sales. Spreadsheets, brokerage statements, and purchase confirmations are your documentation if the IRS questions your numbers.

Special situations: real estate, collectibles, and may have access to dividends

Real estate sales follow the same capital gains rules, but with one exception: if you lived in the home as your primary residence for at least two of the last five years, you can exclude up to $250,000 of gain from tax (or $500,000 if married filing jointly). This exclusion applies once every two years.

Collectibles — art, antiques, coins, and similar items — are taxed at a maximum long-term rate of 28%, even if your income would normally put you in the 15% bracket. This higher rate applies only to collectibles, not to stocks or bonds.

may have access to dividends from stocks and mutual funds are taxed like long-term capital gains, not as ordinary income, if you held the stock for at least 60 days around the dividend date. Non-may have access to dividends are taxed as ordinary income at your regular rate.

State and local capital gains taxes

Federal capital gains tax is only part of the picture. Some states tax capital gains as ordinary income, some tax them at a lower rate, and some do not tax them at all. Your state tax depends on where you live when you sell, not where the asset is located.

Washington, Oregon, and Illinois have recently enacted capital gains taxes on long-term gains from the sale of stocks and other securities. New York, California, and other states tax capital gains as regular income. If you live in a state with no income tax — such as Florida, Texas, or Wyoming — you owe no state capital gains tax, though you still owe federal tax.

If you move to a different state after selling an asset, the state where you lived at the time of sale is the one that can tax the gain. This matters for people who relocate frequently or retire to a lower-tax state.

Frequently Asked Questions

Do I owe capital gains tax if I reinvest the money?

Yes. The tax is based on the profit you made, not on what you do with the money afterward. If you sell a stock for a $5,000 gain and when ready buy a different stock with the proceeds, you still owe tax on the $5,000 gain. Reinvesting does not defer or avoid the tax.

What happens if I sell at a loss?

Capital losses offset capital gains first. If you have more losses than gains, you can deduct up to $3,000 of the excess loss against wages, salary, or other income in that year. Any remaining loss carries forward to future years with no time limit, so you can use it eventually.

How do I know my cost basis if I lost the original purchase confirmation?

Your broker's records are your best source — most brokers keep transaction history for at least seven years online. If you bought before your current broker, contact the old broker or check old statements. If records are truly unavailable, you may be able to reconstruct basis using historical price data, but the IRS may challenge this. Keep all purchase confirmations and statements going forward.

Can I avoid capital gains tax by holding an investment forever?

During your lifetime, yes — you owe no tax on unrealized gains. But if you die holding the investment, your heirs inherit it at a stepped-up basis (the market value on your death date), which erases the gain. They can then sell when ready with little or no tax. This is why some wealthy people hold appreciated assets until death rather than selling.

Are cryptocurrency gains taxed the same way as stock gains?

Yes. The IRS treats cryptocurrency as property, not currency. When you sell or trade crypto, you owe capital gains tax on the profit. The holding period rules are the same: more than one year for long-term rates, one year or less for short-term. You report it on Schedule D just like stocks.