What Capital Gains Tax Is and When You Owe It

Capital gains tax is a tax on the profit you make when you sell something you own — a stock, a rental property, a piece of land, or even a valuable collection. The tax applies only to the gain (the difference between what you paid and what you sold it for), not the full sale price. If you buy a stock for $1,000 and sell it for $1,500, your capital gain is $500, and that $500 is what gets taxed.

You do not owe capital gains tax on every sale. If you sell something for less than you paid for it, you have a loss, not a gain, and no tax is due on that transaction. You also do not owe capital gains tax on items you use personally — selling your car or your furniture does not trigger the tax, even if you sell it for more than you paid. The tax applies to investments and property held for business or investment purposes.

The amount of tax you owe depends on two things: how long you held the asset before selling it, and your income level. These two factors determine whether your gain is taxed at a lower rate or a higher one.

Key Takeaways

  • Capital gains tax applies only to the profit you make on a sale, calculated as the sale price minus what you originally paid for the asset.
  • Long-term capital gains (assets held over one year) are taxed at lower rates — 0%, 15%, or 20% depending on your income — while short-term gains are taxed as ordinary income at rates up to 37%.
  • Your income level determines which tax rate applies to your gains, and higher earners pay higher rates on long-term gains.
  • You report capital gains on your federal tax return using Schedule D, and you can use losses from other sales to reduce the gains you owe tax on.

Long-Term vs. Short-Term Capital Gains

The IRS divides capital gains into two categories based on how long you owned the asset. If you held it for one year or less, it is a short-term capital gain. If you held it for more than one year, it is a long-term capital gain. The distinction matters because the tax rates are very different.

Short-term capital gains are taxed as ordinary income — the same rate that applies to your wages or salary. For 2024, those rates range from 10% to 37% depending on your total income. Long-term capital gains are taxed at preferential rates: 0%, 15%, or 20%, again depending on your income level. Because long-term rates are lower, holding an investment for over a year before selling can result in significantly less tax.

For example, if you are in the 24% ordinary income tax bracket and sell a stock you held for six months, your short-term gain is taxed at 24%. If you sell that same stock after holding it for 14 months, your long-term gain might be taxed at 15% instead. The longer holding period saves you 9 percentage points on the tax rate.

How Your Income Level Affects Your Tax Rate

The tax rate on long-term capital gains depends on your taxable income — not just the gain itself. The IRS sets income thresholds for each tax rate, and these thresholds change each year. For 2024, the 0% rate applies to long-term gains if your income is below a certain threshold (roughly $47,000 for single filers, $94,000 for married filing jointly). The 15% rate applies to income above that but below a higher threshold (roughly $518,000 for single filers). Income above that threshold is taxed at 20%.

This means your total income — from your job, investments, and other sources — determines which rate applies to your capital gains. If you are near a threshold, selling an asset in a lower-income year might result in a lower tax rate than selling it in a higher-income year. Some people time large sales strategically to manage this, though the rules are complex and a tax professional can advise whether this makes sense for your situation.

Short-term capital gains follow your ordinary income tax brackets, which are also income-dependent. The more you earn, the higher the rate on short-term gains.

How to Calculate Your Capital Gain or Loss

Calculating your capital gain is straightforward: subtract your cost basis (what you paid for the asset, including any fees or commissions) from the sale price (what you received when you sold it). The result is your gain or loss.

Cost basis is not always obvious. If you inherited an asset, your cost basis is usually its fair market value on the date of the person's death, not what they originally paid for it. If you received stock as compensation, your cost basis is typically the fair market value on the date you received it. If you bought mutual fund shares over time at different prices, you can choose which shares you are selling (the "specific identification" method) to minimize your gain. Your brokerage or investment account statement should track this information.

If you sell at a loss, you can use that loss to reduce capital gains from other sales in the same year. If your losses exceed your gains, you can deduct up to $3,000 of the net loss against your ordinary income in that year. Any remaining loss carries forward to future years.

Reporting Capital Gains on Your Tax Return

You report capital gains on your federal tax return using Schedule D (Form 1040, Capital Gains and Losses). You list each sale separately — the date you bought it, the date you sold it, your cost basis, the sale price, and the resulting gain or loss. The form automatically calculates your total short-term and long-term gains and losses.

If you have only a few straightforward transactions, some tax software can walk you through the process. If you have many sales, inherited assets with complex basis rules, or business property, a tax professional can may support you report everything correctly and take advantage of any deductions or strategies available to you.

State and local taxes also explore to capital gains in most states. Some states tax capital gains as ordinary income; others have separate capital gains tax rates. A few states do not tax capital gains at all. Your state tax return will have its own reporting requirements, which your tax software or preparer can handle.

Special Cases: Real Estate, Inherited Assets, and Wash Sales

If you sell a home you lived in, you may be able to exclude up to $250,000 of the gain from tax (or $500,000 if you are married filing jointly), provided you owned and lived in the home for at least two of the last five years. This exclusion applies only once every two years, and it does not explore to investment properties or vacation homes.

Inherited assets receive a "step-up" in basis, meaning your cost basis is the asset's fair market value on the date of the person's death, not what they paid for it. This can eliminate or greatly reduce the capital gains tax on inherited investments or property, even if the original owner held them for decades.

A wash sale occurs when you sell an investment at a loss and then buy the same or a substantially identical investment within 30 days before or after the sale. The IRS disallows the loss deduction in a wash sale, and your cost basis in the new purchase is adjusted. This rule prevents people from claiming a loss for tax purposes while maintaining the same investment position.

Frequently Asked Questions

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

No. A loss means you sold for less than you paid, so there is no gain to tax. You can use the loss to reduce capital gains from other sales in the same year, or deduct up to $3,000 against your ordinary income. Losses beyond that carry forward to future years.

What if I sell a stock I have held for 13 months?

That is a long-term capital gain because you held it for more than one year. It is taxed at the preferential long-term rate (0%, 15%, or 20%) based on your income, not at your ordinary income tax rate.

How do I know my cost basis if I lost the original purchase documents?

Your brokerage or investment account should have records of all purchases and sales. If you bought through a mutual fund company or stock plan, contact them directly. For older transactions, the IRS allows reasonable estimates if records are truly unavailable, though a tax professional can advise on the best approach for your situation.

Do I have to report capital gains if they are small?

Yes. Even small gains must be reported on Schedule D. However, if your total capital gains and losses are zero or result in a loss, you may not owe tax on that category — though you still report it on your return.

Can I reduce my capital gains tax by donating the stock to charity instead of selling it?

Yes. If you donate appreciated stock directly to a may have access to charity, you avoid the capital gains tax entirely and can deduct the fair market value of the stock as a charitable contribution. This is often more tax-efficient than selling and donating the proceeds.