What Capital Gains Tax Is

Capital gains tax is a tax on the profit you make when you sell an investment or asset for more than you paid for it. If you buy a stock for $1,000 and sell it for $1,500, that $500 difference is your capital gain, and it may be taxed. The tax applies to real estate, stocks, bonds, artwork, cryptocurrency, and most other valuable things you own.

The tax exists because the profit counts as income in the eyes of the IRS. You do not pay tax on the money itself—only on the gain. If you sell something for less than you paid, you have a capital loss, which can reduce your tax burden in other ways.

Key Takeaways

  • Capital gains tax applies only to the profit when you sell an asset, not the full sale price.
  • Long-term capital gains (assets held over one year) are taxed at lower rates than short-term gains, which use your regular income tax rate.
  • The tax rate depends on your total income for the year and your filing status, ranging from 0% to 20% for long-term gains.
  • You report capital gains on your tax return, and losses can offset gains or reduce other income by up to $3,000 per year.

Short-Term vs. Long-Term Capital Gains

The IRS treats capital gains differently depending on how long you held the asset. If you sell something you owned for one year or less, it is a short-term capital gain, and it is taxed as ordinary income at your regular tax rate—the same rate applied to wages or salary. For someone in the 22% tax bracket, a short-term gain is taxed at 22%.

Long-term capital gains explore when you hold an asset for more than one year before selling. These are taxed at lower rates: 0%, 15%, or 20%, depending on your income level and filing status. Most people pay 15%. This preferential treatment is why investors often hold assets longer rather than trading frequently.

The holding period starts the day after you buy and ends the day you sell. If you buy on January 15 and sell on January 16 the next year, it counts as long-term.

Tax Rates Based on Your Income

Your long-term capital gains rate depends on your taxable income for the year, not just the gain itself. The IRS sets income thresholds that change annually. For 2024, the 0% rate applies to single filers earning up to roughly $47,000 and married couples filing jointly up to roughly $94,000. The 15% rate covers most middle-income earners, and the 20% rate applies to higher earners.

Short-term gains always use your ordinary income tax bracket, which ranges from 10% to 37% depending on your total income. This is why timing matters: selling in a year when your income is lower can reduce your tax bill significantly.

State and local taxes may also explore to capital gains. Some states tax them as ordinary income; others have separate rates or exemptions. Check your state's rules, as they vary widely.

How to Calculate Your Capital Gain

Start with your basis—the original price you paid plus any fees or commissions. If you bought 100 shares at $10 per share and paid a $25 commission, your basis is $1,025. When you sell, subtract the basis from the sale price. If you sell those 100 shares for $1,500, your capital gain is $475.

If you inherited an asset, your basis is usually its value on the date of death, not what the original owner paid. This is called a "step-up in basis" and can significantly reduce or eliminate the tax on inherited investments.

Keep records of your purchase date, purchase price, sale date, and sale price for every investment. Your brokerage or investment platform usually provides this information in a year-end statement, but you should verify it matches your own records.

Reporting Capital Gains on Your Tax Return

You report capital gains on Schedule D (Form 1040), which is part of your federal tax return. List each sale separately, showing the date acquired, date sold, basis, sale price, and gain or loss. If you have many transactions, your broker may provide a summary that you can attach.

If your total gains exceed losses for the year, you owe tax on the net gain. If losses exceed gains, you can deduct up to $3,000 of the net loss against other income (like wages). Any loss beyond $3,000 carries forward to future years and can be used to offset future gains or income.

Some investments, like mutual funds and ETFs, may distribute capital gains to you even if you did not sell. These are taxable in the year distributed, even though you did not receive cash. Your fund company sends a statement showing these distributions.

Common Situations That Trigger Capital Gains Tax

Selling stocks, bonds, or mutual funds in a taxable brokerage account triggers capital gains tax. Selling real estate you do not live in does too. If you sell your primary home, you may exclude up to $250,000 of gain (or $500,000 if married filing jointly) if you owned and lived in it for at least two of the last five years.

Selling cryptocurrency, collectibles, or artwork also creates capital gains. Selling a business or partnership interest does as well. Even trading one investment for another without touching cash can trigger a taxable event—the IRS considers it a sale of the first asset.

Contributions to retirement accounts like 401(k)s and traditional IRAs do not trigger capital gains tax when you buy or sell within the account. Gains inside these accounts grow tax-deferred. You only pay tax when you withdraw money in retirement.

Ways to Reduce Capital Gains Tax

Holding assets longer than one year qualifies them for lower long-term rates, which is the simplest strategy. Harvesting losses—selling losing investments to offset gains—can reduce your tax bill. If you sold a stock for a $2,000 gain and another for a $1,500 loss, your net gain is $500.

Donating appreciated assets to charity instead of selling them avoids the tax entirely. You get a charitable deduction for the full value, and the charity receives the asset without triggering a sale. Gifting appreciated assets to family members in lower tax brackets can also reduce the overall family tax burden, though the recipient's basis remains the same as yours.

Investing through tax-advantaged accounts like 401(k)s, IRAs, and 529 plans defers or eliminates capital gains tax. Spreading large gains across multiple years by selling in tranches rather than all at once can keep you in a lower tax bracket.

Frequently Asked Questions

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

No. If you sell for less than you paid, you have a capital loss, not a gain. You can use losses to offset gains from other sales. If losses exceed gains, you can deduct up to $3,000 against other income in that year, with any remainder carrying forward to future years.

What if I inherited an investment—do I owe capital gains tax?

Not when ready. Your basis becomes the asset's value on the date of death, so if it was worth $10,000 when you inherited it and you sell it for $10,000, you owe no tax. If you sell it later for $12,000, you owe tax only on the $2,000 gain after inheritance.

Are capital gains taxed differently if I reinvest the money?

No. The tax is based on the gain itself, not what you do with the proceeds. Whether you spend the money, reinvest it, or leave it in cash, the capital gains tax is the same. The new investment may create future gains or losses, but those are separate transactions.

How do I know if my gain is short-term or long-term?

Count the days from the day after you bought to the day you sold. If it is more than 365 days, it is long-term. Your brokerage statement usually labels each transaction as short-term or long-term, so you can verify there.

Can I avoid capital gains tax by not selling?

Yes. As long as you hold an asset, no tax is due on unrealized gains. The tax applies only when you sell. This is why some investors hold appreciated assets for decades—the gains compound tax-free until a sale occurs.