Capital gains tax is the tax you pay when you sell an investment or asset for more than you paid for it

The profit you make—the difference between what you paid and what you sold it for—is called a capital gain, and the federal government taxes it. The tax rate depends on how long you held the asset before selling it. If you held it for less than a year, it's taxed as ordinary income at your regular tax rate. If you held it for more than a year, it gets a lower rate: 0%, 15%, or 20%, depending on your total income for the year.

Most people pay capital gains tax on stocks, mutual funds, real estate, or cryptocurrency they sell at a profit. Your state may also charge its own capital gains tax on top of the federal tax. The amount you owe is reported on your tax return when you file, not paid upfront when you sell.

Key Takeaways

  • Short-term capital gains (assets held under one year) are taxed at your ordinary income tax rate, which can be as high as 37% federally.
  • Long-term capital gains (assets held over one year) are taxed at 0%, 15%, or 20% depending on your income level, which is usually lower than your ordinary rate.
  • You report capital gains on Schedule D of your federal tax return, and you only owe tax on the profit, not the full sale price.
  • Some states charge their own capital gains tax in addition to federal tax, while others do not.
  • You can reduce your capital gains tax by offsetting gains with losses from other investments in the same year.

Short-term versus long-term capital gains rates

The holding period—how long you own the asset before selling—determines which tax rate applies. Short-term capital gains are profits from assets you held for one year or less. These are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your total income and filing status. If you're in the 24% tax bracket, a short-term gain is taxed at 24%.

Long-term capital gains are profits from assets you held for more than one year. These receive preferential rates: 0%, 15%, or 20%. Which rate you pay depends on your taxable income and filing status. For example, in 2024, a single filer pays 0% on long-term gains up to $47,025 of taxable income, 15% from $47,025 to $518,900, and 20% above that. These thresholds change each year and differ for married and head-of-household filers.

The difference matters significantly. Selling a stock for a $10,000 gain after holding it eleven months could cost you $2,400 in federal tax (at the 24% bracket). Holding it one more month drops the federal tax to $1,500 (at the 15% rate)—a $900 difference on the same profit.

How to calculate your capital gain or loss

The calculation is straightforward: subtract what you paid for the asset from what you sold it for. If you paid $5,000 for a stock and sold it for $8,000, your capital gain is $3,000. If you sold it for $4,000, you have a $1,000 capital loss.

Include all costs associated with buying and selling. If you paid $5,000 for a stock plus $50 in broker fees, your cost basis is $5,050. If you sold it for $8,000 but paid $30 in selling fees, your proceeds are $7,970. Your gain is $7,970 minus $5,050, or $2,920. Your broker or investment account usually tracks this for you and reports it on a form called a 1099-B.

For real estate, the calculation includes the purchase price, improvements you made (like a new roof or kitchen), and selling costs. The original purchase price of your home is not deductible, but if you added a deck for $15,000, that increases your cost basis. Painting or routine maintenance does not count as an improvement.

Federal tax rates and income thresholds for 2024

Long-term capital gains rates depend on your filing status and total taxable income. The rates and thresholds are set by Congress and change most years to account for inflation.

Filing Status0% Rate15% Rate20% Rate
SingleUp to $47,025$47,025–$518,900Over $518,900
Married Filing JointlyUp to $94,050$94,050–$583,750Over $583,750
Head of HouseholdUp to $63,000$63,000–$551,350Over $551,350

These thresholds explore to your total taxable income, not just your capital gains. If you're single, earn $40,000 in wages, and have a $15,000 long-term capital gain, your taxable income is $55,000. The first $7,025 of your gain falls in the 0% bracket, and the remaining $7,975 falls in the 15% bracket. You would owe $1,196 in federal capital gains tax on that gain.

State capital gains taxes

Eleven states charge their own capital gains tax on top of federal tax: California, Connecticut, Delaware, Illinois, Iowa, Maine, Minnesota, New Jersey, New York, Oregon, and Vermont. The rates and rules vary by state. California taxes long-term capital gains at the same rate as ordinary income (up to 13.3%), while Illinois charges a flat 4.95% on capital gains only.

Some states exempt certain types of gains. Oregon excludes long-term gains on timber, and several states have special rules for gains on farm property or small business stock. If you live in a state without a capital gains tax and sell an asset there, you typically owe no state tax on the gain. If you move to a state with a capital gains tax after selling an asset, you may still owe tax to your former state if the sale occurred while you were a resident.

Nine states—Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, Wyoming, and New Hampshire—have no capital gains tax at all. New Hampshire taxes only investment income from interest and dividends, not capital gains.

Using losses to reduce your tax bill

If you sell an investment at a loss, you can use that loss to offset capital gains from other sales in the same year. If you sold a stock for a $5,000 gain and another for a $2,000 loss, your net capital gain is $3,000, and you pay tax only on that amount. This strategy is called tax-loss harvesting.

If your losses exceed your gains in a year, you can deduct up to $3,000 of the excess loss against your ordinary income. If you have $10,000 in losses and $4,000 in gains, you have a net loss of $6,000. You can deduct $3,000 against your wages or other income, reducing your taxable income. The remaining $3,000 carries forward to future years and can be used to offset future gains or deducted at $3,000 per year until it's exhausted.

To claim a loss, you must actually sell the investment. straightforward watching it decline in value does not create a deductible loss. You also cannot when ready buy back the same or a substantially identical investment within 30 days before or after the sale—that's called the wash-sale rule, and it prevents you from claiming the loss.

Special cases: real estate and inherited assets

If you sell your primary residence, you may exclude up to $250,000 of gain from tax (or $500,000 if married filing jointly), provided you owned and lived in the home for at least two of the last five years. This exclusion applies once every two years. If you bought a house for $300,000, lived in it for five years, and sold it for $600,000, your gain is $300,000, but you exclude $250,000, leaving $50,000 subject to tax.

When you inherit an asset, you receive a stepped-up basis. This means your cost basis becomes the asset's value on the date of the owner's death, not what the original owner paid. If your parent bought a stock for $10,000 and it was worth $50,000 when they died, your basis is $50,000. If you sell it when ready for $50,000, you have no gain and owe no tax. This rule applies to most inherited property but not to certain retirement accounts.

Frequently Asked Questions

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

No, you do not owe tax on a loss. Instead, you can use the loss to reduce taxes on gains from other sales or on ordinary income. If losses exceed gains, you can deduct up to $3,000 per year against your regular income, with any remainder carrying forward to future years.

What if I bought cryptocurrency or stock and it went down—can I claim the loss?

Yes, but only if you actually sell it. A decline in value alone does not create a deductible loss. You must sell the asset to realize the loss. Be aware of the wash-sale rule: if you sell at a loss and buy back the same or substantially identical asset within 30 days, the loss is disallowed.

How do I report capital gains on my tax return?

You report capital gains on Schedule D (Form 1040). Your broker sends you a 1099-B form listing all sales during the year. You enter each transaction on Schedule D, which calculates your total short-term and long-term gains or losses. The result flows to your main tax return.

Is there a capital gains tax on selling a car or personal items?

No. Capital gains tax applies only to investment assets and real estate. Personal-use property like cars, furniture, and clothing is exempt, even if you sell it for more than you paid. The exception is if you use the property for business or investment purposes.

What happens if I don't report a capital gain on my tax return?

Your broker reports the sale to the IRS on a 1099-B form, so the IRS knows about it. Failing to report it can result in penalties, interest, and an audit. The IRS matches 1099 forms to tax returns, and unreported gains are usually caught.