Capital gains tax is a tax on profit when you sell an asset for more than you paid for it

When you sell a stock, rental property, or other investment and make a profit, the federal government taxes that gain. The rate you pay depends on how long you held the asset and how much total income you earned that year. Long-term gains (assets held over one year) are taxed at lower rates than short-term gains, which are taxed as ordinary income.

Most states also tax capital gains, though the rate and rules vary by state. Some states tax capital gains as regular income; others have a separate capital gains tax or no capital gains tax at all. Your total tax bill is the combination of federal and state taxes.

Key Takeaways

  • Federal long-term capital gains rates are 0%, 15%, or 20%, depending on your total income for the year.
  • Short-term capital gains (assets held one year or less) are taxed as ordinary income at rates up to 37%.
  • Your state may add its own capital gains tax on top of the federal rate.
  • The profit you report is the sale price minus what you originally paid, plus any improvements or deductions.

Federal long-term capital gains rates

Long-term capital gains receive preferential tax treatment. If you held an asset for more than one year before selling it, your gain falls into one of three federal brackets: 0%, 15%, or 20%. Which bracket you land in depends on your total taxable income for the year, not the size of the gain itself.

The income thresholds that determine your rate change each year and vary based on your filing status (single, married filing jointly, head of household, etc.). For 2024, for example, single filers pay 0% on long-term gains if their taxable income is below a certain threshold, 15% on gains within a middle range, and 20% on gains above that. Married couples filing jointly have higher thresholds before moving into the 15% and 20% brackets.

Because these thresholds shift annually for inflation, you should check the current year's rates with the IRS or a tax professional before calculating what you owe. The IRS publishes updated brackets each January.

Short-term capital gains and ordinary income rates

If you sell an asset you held for one year or less, the gain is taxed as short-term capital gains. Short-term gains are taxed at your ordinary income tax rate, which ranges from 10% to 37% depending on your total income and filing status.

This is why holding period matters. A $10,000 gain on a stock you sold after 11 months could be taxed at 37% if you're in the highest bracket, but the same $10,000 gain on a stock you held for 13 months might be taxed at only 20%. The difference is substantial.

How to calculate the gain you owe tax on

Your capital gain is not the full sale price—it is the profit. To find it, subtract your cost basis (what you originally paid) from the sale price. If you bought 100 shares of stock at $50 per share and sold them at $75 per share, your gain is $2,500 (100 shares × $25 profit per share).

Cost basis includes the original purchase price plus any fees or commissions you paid to buy the asset. If you made improvements to a rental property—a new roof, new plumbing, major repairs—those costs can be added to your basis, which lowers your taxable gain. You cannot deduct routine maintenance or repairs that straightforward keep the property in its current condition.

If you inherited an asset, your cost basis is typically "stepped up" to the fair market value on the date of death, not what the original owner paid. This can significantly reduce or eliminate the taxable gain if you sell the inherited asset soon after.

State capital gains taxes

Eleven states currently have a separate capital gains tax in addition to federal tax: California, Connecticut, Delaware, Illinois, Maryland, Minnesota, New Jersey, New York, Oregon, Vermont, and Washington. The rates and rules differ by state. Some states tax long-term and short-term gains at the same rate; others distinguish between them.

Three states—Alaska, Florida, and Texas—have no state income tax and therefore no capital gains tax. The remaining states tax capital gains as part of ordinary income, so your state income tax rate applies to your gains.

If you live in one state but sell property in another, you may owe tax to both states. Some states offer credits to avoid double taxation, but the rules are complex. A tax professional in your state can clarify what you owe.

Special situations: real estate and primary residences

If you sell a home you lived in as your primary residence, you may exclude up to $250,000 of gain from federal tax (or $500,000 if you're married filing jointly). To may have access to, you must have owned and lived in the home for at least two of the five years before the sale.

This exclusion applies only to your primary residence, not to rental properties, vacation homes, or investment real estate. Rental property sales are subject to the full capital gains tax, though you can deduct depreciation you claimed while renting it (though that depreciation may be taxed at a higher rate when you sell).

Reporting capital gains on your tax return

You report capital gains on Schedule D (Form 1040), which you file with your federal income tax return. Your brokerage or the entity that handled the sale will send you a Form 1099-B (for stocks and mutual funds) or Form 1099-S (for real estate) showing the sale price. Use this form to fill out Schedule D.

If you sold multiple assets, you list each one separately and calculate the gain or loss for each. You can use losses to offset gains—if you sold one stock at a $5,000 gain and another at a $3,000 loss, you report a net gain of $2,000. If losses exceed gains, you can deduct up to $3,000 of net losses against ordinary income in that year, and carry forward any remaining losses to future years.

Frequently Asked Questions

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

No. If you sell an asset for less than you paid, you have a capital loss, not a gain. You do not owe tax on a loss. You can use losses to reduce gains from other sales, and if losses exceed gains, you can deduct up to $3,000 against other income in that year.

What if I inherited stock or property—do I owe capital gains tax when I sell it?

Probably not, or very little. Inherited assets receive a "stepped-up" cost basis, meaning your basis is the fair market value on the date of death, not what the original owner paid. If you sell soon after inheriting, your gain is usually minimal or zero.

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

Yes, in some cases. If you have both gains and losses, you can sell losing positions to offset gains in the same year. You can also spread sales across two tax years if it keeps you in a lower tax bracket. A tax professional can help you plan this.

Are dividends taxed the same way as capital gains?

may have access to dividends are taxed at the same preferential rates as long-term capital gains (0%, 15%, or 20%). Non-may have access to dividends are taxed as ordinary income. Your brokerage will tell you which type you received on your 1099 form.

What happens if I sell cryptocurrency or digital assets?

Cryptocurrency is treated as property by the IRS. When you sell it, you owe capital gains tax on the profit, just as you would with stock or real estate. The holding period (short-term or long-term) is determined the same way: more than one year for long-term rates.