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, business, or piece of land — and later sell it for a higher price, the profit is called a capital gain. The IRS taxes that profit. The amount you owe depends on how long you held the asset and your total income that year. You do not owe capital gains tax on assets you still own, only on the ones you sell.

The tax applies to almost any asset with value: real estate, stocks, bonds, cryptocurrency, collectibles, and business interests. If you inherited an asset and sold it, or received one as a gift and sold it, capital gains tax still applies — though the rules for inherited property are different and often more favorable.

Key Takeaways

  • Capital gains tax is owed only when you sell an asset for more than you paid for it, not while you own it.
  • Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, which are taxed as ordinary income.
  • Your tax rate depends on your total income that year and your filing status, not just the size of the gain.
  • You report capital gains on Schedule D of your tax return, and the IRS receives records from brokers and title companies.

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

How long you owned the asset before selling it determines which tax rate applies. If you held it for more than one year, it is a long-term capital gain. If you held it for one year or less, it is a short-term capital gain.

Short-term capital gains are taxed as ordinary income — at the same rate as your wages or salary. That rate can be 10%, 12%, 22%, 24%, 32%, 35%, or 37%, depending on your income and filing status. Long-term capital gains have their own lower tax brackets: 0%, 15%, or 20%. Because of this, holding an asset just over one year can significantly reduce your tax bill.

For example, if you buy stock for $10,000 and sell it eight months later for $12,000, the $2,000 gain is taxed as short-term. If you sell that same stock after 13 months, the $2,000 gain is taxed as long-term at a lower rate. The difference in tax owed can be hundreds of dollars.

How the IRS knows about your sales

You cannot simply ignore a capital gain and hope the IRS does not notice. Brokers, title companies, and financial institutions send records to the IRS automatically. When you sell stock, your brokerage files Form 1099-B. When you sell real estate, the title company files Form 1099-S. These forms show the sale price and go directly to the IRS.

The IRS matches these forms to your tax return. If you report a different gain amount — or no gain at all — the agency will flag the discrepancy. You are required to report all capital gains on Schedule D of your federal tax return, even if the gain is small.

What counts as your cost basis

Cost basis is what you originally paid for the asset, plus certain costs tied to buying or improving it. The capital gain is the sale price minus your cost basis. Getting this number right matters because it directly changes how much tax you owe.

For most assets, cost basis is straightforward: the purchase price plus any fees or commissions you paid to buy it. For real estate, you can also add the cost of major improvements — a new roof, foundation repair, or room addition — but not routine maintenance like painting or landscaping. For inherited property, cost basis is usually reset to the market value on the date of death, which often means heirs owe little or no capital gains tax even if the asset has risen in value since the original purchase.

If you received an asset as a gift, your cost basis is generally the same as the giver's cost basis, not the value when you received it. This matters if the asset has appreciated significantly since the original purchase.

How your income level affects your capital gains rate

The long-term capital gains tax rate you pay depends on your taxable income for the year, not just the size of the gain. The IRS has income thresholds for each rate bracket, and they change annually. For 2024, the 0% long-term rate applies to single filers with taxable income up to roughly $47,000, the 15% rate applies to income between roughly $47,000 and $518,000, and the 20% rate applies to income above that.

This means your capital gain can push you into a higher tax bracket. If you are single with $45,000 in ordinary income and a $10,000 long-term capital gain, part of that gain may be taxed at 0% and part at 15%. The exact split depends on where the thresholds fall that year. State and local taxes also apply in most places, adding another 3% to 13% depending on where you live.

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 capital losses to offset capital gains in the same year. If you have $5,000 in capital gains and $3,000 in capital losses, you report a net gain of $2,000 and owe tax only on that amount.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the net loss against your ordinary income. Any losses beyond that carry forward to future years and can offset future gains or ordinary income. This is why some investors deliberately sell losing positions late in the year — to reduce their tax bill.

Special situations: real estate, retirement accounts, and collectibles

Home sales have a special rule. If you are single and 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 the gain from tax. Married couples filing jointly can exclude up to $500,000. This means many home sales result in no capital gains tax at all.

Assets held inside retirement accounts — 401(k)s, IRAs, and similar plans — do not trigger capital gains tax when you sell them within the account. You only pay tax when you withdraw money from the account, and the tax is usually ordinary income tax, not capital gains tax. This is one reason retirement accounts are tax-advantaged.

Collectibles like art, coins, and antiques are taxed differently. Even long-term gains on collectibles are taxed at a maximum rate of 28%, which is higher than the standard long-term capital gains rates. Cryptocurrency is treated as property, so gains are capital gains, not ordinary income.

Frequently Asked Questions

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

No. Capital gains tax is owed only when you sell. If you own stock worth $50,000 that you bought for $30,000, you owe nothing until you sell it. The unrealized gain — the profit you have not yet locked in — is not taxed.

What if I sold an asset at a loss?

You can use the loss to offset capital gains from other sales in the same year. If losses exceed gains, you can deduct up to $3,000 against ordinary income. Losses beyond that carry forward to future years.

How do I report capital gains on my tax return?

You report all sales on Schedule D of Form 1040. List each transaction separately: the asset, the date bought, the date sold, the cost basis, the sale price, and the gain or loss. The total goes to your main tax return.

Can I reduce my capital gains tax by timing when I sell?

Yes, in limited ways. Holding an asset over one year instead of under one year can cut your tax rate significantly. You can also sell losing positions to offset gains. But you cannot avoid the tax by delaying the sale indefinitely — it is owed when you sell.

What if I inherited an asset and then sold it?

Inherited assets receive a "step-up" in cost basis, meaning your cost basis is the market value on the date of death, not what the original owner paid. This often means little or no capital gains tax even if the asset has risen in value since the original purchase.