Skip to main content

HomeAll guides

When Capital Gains Tax Applies to Your Sales and Investments

Capital gains tax applies when you sell an asset for more than you paid for it

You owe capital gains tax on the profit when you sell something you own — a stock, rental property, cryptocurrency, or collectible — for more than your original purchase price. The tax applies to the gain itself, not the full sale price. If you buy a stock for $1,000 and sell it for $1,500, you owe tax on the $500 gain, not the $1,500.

The timing of the sale determines which tax rate applies. Gains on assets you held for one year or less are taxed as short-term capital gains, using your ordinary income tax rates. Gains on assets you held for more than one year are taxed as long-term capital gains, which have lower rates: 0%, 15%, or 20% depending on your income level. This difference can be substantial — a short-term gain might be taxed at 24% or 32%, while a long-term gain on the same amount might be taxed at 15%.

You report capital gains on your federal tax return (Form 1040) and may owe state tax as well, depending on where you live. Some states tax capital gains at your ordinary income rate; others tax them differently or not at all. The IRS tracks your cost basis — what you originally paid — so keep records of your purchase price and date.

Key Takeaways

  • Capital gains tax applies only to the profit on a sale, not the full amount you receive.
  • Assets held one year or less are taxed at your ordinary income rate; assets held longer than one year are taxed at lower long-term rates of 0%, 15%, or 20%.
  • Your income level determines which long-term rate applies, and state tax may also explore depending on where you live.
  • You must report the sale on your tax return and keep records of what you paid and when you bought the asset.
  • Losses on sales can offset gains and reduce your taxable capital gains for the year.

How the holding period changes your tax rate

The length of time you own an asset before selling it is the single largest factor in how much tax you pay. If you hold an asset for 12 months or less, any gain is a short-term capital gain and is taxed at your ordinary income tax bracket — the same rate as your wages or salary. For 2024, those rates range from 10% to 37% depending on your income.

If you hold an asset for more than 12 months, the gain becomes a long-term capital gain and is taxed at preferential rates: 0%, 15%, or 20%. Which rate you pay depends on your taxable income, not on how much the asset gained. A person in the 0% bracket might pay no federal tax on a long-term gain of $50,000, while someone in the 20% bracket pays tax on the same gain at 20%.

The holding period is measured from the purchase date to the sale date. If you buy a stock on June 15, 2023, and sell it on June 15, 2024, you have held it for exactly one year and the gain is long-term. If you sell on June 14, 2024, it is short-term. The date matters because the difference in tax rate can be thousands of dollars on a large gain.

What counts as a sale that triggers capital gains tax

A taxable sale happens when you exchange an asset for cash or other property and give up ownership. Selling shares on a brokerage account, selling a house, selling a business, or selling collectibles all trigger capital gains tax on any profit. You also owe tax when you trade one asset directly for another — swapping cryptocurrency for cryptocurrency, for example, or trading stocks for real estate in a private transaction.

Some transactions that feel like sales do not trigger capital gains tax. Donating an asset to charity does not create a taxable gain (though you may be able to deduct the fair market value). Transferring an asset to a spouse during marriage does not trigger tax. Inheriting an asset does not trigger tax on the gain that occurred before you inherited it — your cost basis is "stepped up" to the fair market value on the date of death, so you only owe tax on gains that happen after you own it.

Selling at a loss also does not trigger capital gains tax — instead, you can use the loss to offset other gains. If you sell one stock for a $3,000 gain and another for a $2,000 loss, you report a net gain of $1,000. If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against ordinary income, and carry forward any remaining loss to future years.

Assets subject to capital gains tax

Capital gains tax applies to most assets you own for investment or personal use. Stocks, bonds, mutual funds, and exchange-traded funds (ETFs) are taxed on gains. Real property — houses, rental properties, land — is taxed on gains, though you may be able to exclude up to $250,000 of gain on a primary residence if you meet certain conditions. Cryptocurrency is taxed as property, so buying and selling Bitcoin, Ethereum, or other coins triggers capital gains tax on any profit.

Collectibles — art, antiques, precious metals, stamps — are taxed on gains, often at a higher long-term rate of 28% rather than 15% or 20%. Business assets and equipment sold at a gain may be taxed as capital gains or as ordinary income depending on the type of asset and how long you held it. Retirement accounts like 401(k)s and IRAs do not trigger capital gains tax on sales within the account, but withdrawals are taxed as ordinary income.

Some assets are not subject to capital gains tax at all. Municipal bonds issued by state and local governments produce interest that is usually exempt from federal tax. Certain U.S. savings bonds and Treasury securities have special tax treatment. Life insurance proceeds are not taxed as capital gains. If you are unsure whether a specific asset is subject to capital gains tax, consult the IRS website or a tax professional.

How income level affects your long-term capital gains rate

The 0%, 15%, and 20% long-term capital gains rates are not fixed — they depend on your taxable income for the year. The IRS sets income thresholds that change annually. For 2024, single filers in the 0% bracket have taxable income up to $47,025; the 15% bracket runs from $47,025 to $518,900; and the 20% bracket applies to income above $518,900. Married couples filing jointly have higher thresholds: 0% up to $94,050, 15% from $94,050 to $583,750, and 20% above that.

Your taxable income includes wages, self-employment income, interest, dividends, and capital gains combined. If you have $60,000 in wages and sell an investment for a $20,000 long-term gain, your taxable income is $80,000. Depending on your filing status, that $20,000 gain might be taxed partly at 0% and partly at 15%, or entirely at 15%. The order matters: ordinary income is counted first, then capital gains are stacked on top.

This stacking effect means that realizing a large capital gain in a single year can push you into a higher tax bracket. If you have the option to spread a gain across two years — by selling in December and January rather than all in one year — you might reduce your total tax. Some people also time large gains to years when their income is lower, such as after retirement or a job loss.

State capital gains taxes and special situations

Federal capital gains tax is only part of the picture. Most states tax capital gains as ordinary income at their state income tax rate, which ranges from about 3% to 13% depending on the state. A few states — Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — have no state income tax at all, so residents pay no state capital gains tax. California taxes capital gains at ordinary income rates, which can reach 13.3%. New York taxes them at rates up to 10.9%.

Three states have separate capital gains taxes. Washington imposes a 7% tax on long-term capital gains above $250,000 per year. Illinois taxes capital gains at 4.95%, separate from its income tax. Minnesota taxes capital gains at a higher rate than ordinary income for high earners. If you live in one of these states or are considering moving, the state tax can be as significant as the federal tax.

Special situations can change how capital gains are taxed. If you sell a home that is your primary residence, you may be able to exclude up to $250,000 of gain ($500,000 if married filing jointly) if you owned and lived in the home for at least two of the last five years. If you sell a business, you may be able to use Section 1202 small business stock exclusion to exclude part of the gain. If you have unrecaptured Section 1250 gains from depreciation on rental property, those are taxed at 25% rather than 15% or 20%.

Reporting capital gains on your tax return

You report capital gains on Form 1040, Schedule D. For each sale, you list the asset, the date you bought it, the date you sold it, your cost basis (what you paid), the sale price, and the gain or loss. If you have many transactions, you may use Form 8949 (Sales of Capital Assets) to list them, then summarize on Schedule D. Your broker sends you a Form 1099-B showing all sales for the year, which helps you match your records.

Short-term gains and long-term gains are reported separately on Schedule D. The form calculates your net short-term gain or loss and your net long-term gain or loss. If you have a net long-term gain, you report it on the appropriate line of Form 1040 and it is taxed at the preferential rates. If you have a net loss, you can deduct up to $3,000 against ordinary income and carry forward the rest.

Keeping accurate records is essential. Save your purchase confirmations, sale confirmations, and any statements showing cost basis. If you reinvested dividends or made other adjustments to your cost basis, document those too. If you cannot prove your cost basis, the IRS may treat your entire sale price as gain, which is far worse than reporting the actual gain.

Frequently Asked Questions

Do I owe capital gains tax if I sell an asset at a loss?

No, you do not owe capital gains tax on a loss. Instead, you can use the loss to offset other capital gains. If your losses exceed your gains, you can deduct up to $3,000 of the excess loss against ordinary income in that year, and carry forward any remaining loss to future years.

What if I inherit an asset and then sell it?

When you inherit an asset, your cost basis is stepped up to the fair market value on the date of death. You only owe capital gains tax on gains that occur after you inherit it. If you inherit a house worth $500,000 and sell it two months later for $510,000, you owe tax on only the $10,000 gain, not on the appreciation that happened before you inherited it.

Does selling cryptocurrency trigger capital gains tax?

Yes. The IRS treats cryptocurrency as property, not currency. When you sell or trade crypto for a profit, you owe capital gains tax on the gain. The holding period determines whether it is taxed as short-term or long-term. Trading one cryptocurrency for another is also a taxable event.

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

You can defer capital gains tax by not selling, but you cannot avoid it permanently. When you die, your heirs receive a stepped-up cost basis, so they do not owe tax on gains that occurred during your lifetime. However, if they sell the asset, they owe tax on any gains after they inherit it.

What is the difference between capital gains and investment income?

Capital gains are profits from selling an asset. Investment income (also called unearned income) includes dividends from stocks and interest from bonds. Dividends are taxed similarly to capital gains — may have access to dividends get the preferential 0%, 15%, or 20% rates, while non-may have access to dividends are taxed as ordinary income. Interest is usually taxed as ordinary income.

This guide is for general information only and is not medical, financial, legal, or other professional advice. For decisions specific to your situation, consult a qualified professional. See our Editorial Policy.