What is capital gains tax?

Capital gains tax is the tax owed on the profit from selling a capital asset — a stock, real estate, business, or other investment. Short-term gains (assets held one year or less) are taxed as ordinary income; long-term gains (held more than one year) are taxed at lower preferential rates: 0%, 15%, or 20%, depending on income. Verify current-year rates at IRS.gov.

When you sell a capital asset for more than you paid for it (your cost basis), the profit is a capital gain. The IRS taxes capital gains — but the rate depends on how long you held the asset before selling. Long-term holding is rewarded with lower rates. See IRS Publication 544 (Sales and Other Dispositions of Assets) for the full rules. This is educational content; consult a tax professional for your specific situation.

Short-term vs. long-term capital gains

Long-term capital gains rates (2025 baseline — verify 2026 at IRS.gov)

IRS 2025 long-term capital gains rate thresholds (reference — verify current year)

Primary home exclusion: up to $250,000 tax-free

If you sell your primary residence, you may exclude up to $250,000 of gain ($500,000 for married filing jointly) from federal capital gains tax — as long as you owned and lived in the home as your primary residence for at least 2 of the last 5 years before the sale. This exclusion cannot be used more than once every 2 years. See IRS Publication 523 (Selling Your Home) for full rules.

Capital losses can offset gains

If you sell an asset for less than your cost basis, you have a capital loss. Capital losses can offset capital gains dollar for dollar. If losses exceed gains, up to $3,000 per year in net capital losses can offset ordinary income (for single and married filing jointly). Any remaining losses carry forward to future tax years. See IRS Topic No. 409.

This is educational content, not tax advice

Capital gains tax rules involve holding periods, cost basis calculations, state taxes, and multiple exceptions. This page explains the federal framework. Consult a qualified tax professional before selling investments or real estate — especially if gains are large.

Key takeaways

Related

Browse all answers
More answers to common questions about financing, banking, and credit.