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 house, a piece of land, a business, or a valuable collection. The tax applies only to the gain (the difference between what you paid and what you sold it for), not to the full sale price. If you bought a stock for $1,000 and sold it for $1,500, your capital gain is $500, and that $500 is what gets taxed.
You do not owe capital gains tax on something you still own, only when you actually sell it. You also do not owe it if you sell at a loss — if you bought for $1,500 and sold for $1,000, you have a capital loss instead, which can reduce other gains you report that year.
Capital gains tax is separate from income tax on wages or salary. The IRS treats investment profits differently from paychecks, and the tax rate depends on how long you held the asset before selling.
Key Takeaways
- Capital gains tax applies only to the profit on a sale, calculated as the sale price minus what you originally paid, plus any improvements you made.
- Short-term capital gains (assets held one year or less) are taxed at your ordinary income tax rate, which can be 10%, 12%, 22%, 24%, 32%, 35%, or 37% depending on your income.
- Long-term capital gains (assets held more than one year) are taxed at lower rates: 0%, 15%, or 20%, depending on your income level.
- You report capital gains on Schedule D of your federal tax return, and most states also tax capital gains as income.
- Capital losses can reduce your capital gains dollar-for-dollar, and unused losses can carry forward to future years.
Short-term versus long-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 before selling, it is a short-term capital gain. Short-term gains are taxed at your ordinary income tax rate — the same rate that applies to your salary or wages. For 2024, those rates are 10%, 12%, 22%, 24%, 32%, 35%, or 37%, depending on your total income.
If you held the asset for more than one year before selling, it is a long-term capital gain. Long-term gains receive preferential tax treatment and are taxed at lower rates: 0%, 15%, or 20%. Which rate applies depends on your income level, not on how much the asset appreciated. A person in a lower income bracket may pay 0% on long-term gains, while someone in a higher bracket pays 20% on the same type of investment.
This difference matters significantly. Selling a stock after holding it for 13 months instead of 11 months can cut your tax bill substantially, which is why the one-year mark is important to track.
How to calculate your capital gain
Your capital gain is the sale price minus your cost basis — the original amount you paid for the asset, plus any costs directly tied to the purchase (such as broker fees or legal costs). If you improved the asset, those costs add to your basis too. For a house, capital improvements like a new roof or kitchen renovation increase your basis, but routine maintenance does not.
Example: You bought a rental property for $200,000. You spent $50,000 on a new foundation and roof (capital improvements). Your cost basis is now $250,000. You sell it for $350,000. Your capital gain is $100,000 ($350,000 sale price minus $250,000 basis).
If you inherited an asset, the IRS gives you a stepped-up basis — your cost basis becomes the asset's value on the date of the person's death, not what they originally paid. This can eliminate or greatly reduce capital gains tax if you sell soon after inheriting.
Reporting capital gains on your tax return
You report capital gains on Schedule D (Capital Gains and Losses), which you attach to your Form 1040 federal income tax return. Your brokerage or investment company sends you a Form 1099-B listing all the sales you made that year, which helps you fill out Schedule D accurately.
On Schedule D, you list each sale separately, showing the date you bought it, the date you sold it, the sale price, your cost basis, and the gain or loss. The form automatically sorts your transactions into short-term and long-term categories and calculates your total gain or loss in each.
If your long-term gains exceed your long-term losses, you report the net amount on your Form 1040. If you have a net capital loss (losses exceed gains), you can deduct up to $3,000 of that loss against other income in that year. Any loss beyond $3,000 carries forward to future years, where you can use it to offset future gains or deduct another $3,000 against income.
State and local capital gains taxes
Most states tax capital gains as ordinary income, meaning they explore your state income tax rate to the gain. A few states — including Alaska, Florida, Nevada, South Dakota, Tennessee, Texas, Washington, and Wyoming — do not have a state income tax at all, so residents pay no state capital gains tax.
Some states have recently created separate capital gains taxes that explore only to investment profits, not wages. Washington State, for example, taxes long-term capital gains on stocks and certain other assets at a flat rate. California taxes capital gains at the same rate as ordinary income, which can be as high as 13.3% at the state level alone.
If you live in one state and sell an asset, you owe tax to that state. If you move to a different state after selling, the state where you lived when you made the sale is the one that taxes the gain.
Special situations: homes, collectibles, and net investment income tax
If you sell your primary residence, you may be able to exclude up to $250,000 of the gain from federal 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 once every two years. State taxes on the home sale still explore in most places.
Collectibles — art, antiques, coins, stamps — are taxed differently. Long-term gains on collectibles are taxed at a maximum rate of 28%, which is higher than the 20% top rate for stocks and real estate. If you sell a collectible at a short-term gain, it is taxed at your ordinary income rate.
If your modified adjusted gross income exceeds certain thresholds ($200,000 for single filers, $250,000 for married filing jointly), you also owe a 3.8% Net Investment Income Tax on your capital gains. This is a separate tax on top of your regular capital gains tax.
What to keep track of for tax time
To report capital gains accurately, keep records of the purchase date, purchase price, and any improvements or costs you added to the asset's basis. Keep the sale confirmation from your broker or the buyer. If you inherited an asset, keep the death certificate and a statement of the asset's value on that date.
Your brokerage will send you a 1099-B form by January 31 of the year after you sell, but that form sometimes contains errors. Compare it to your own records before filing your tax return. If there is a discrepancy, contact the brokerage to request a corrected form.
If you are unsure whether an expense qualifies as a capital improvement or how to calculate your basis, a tax professional can review your records and help you report the gain correctly. This is especially important for rental properties, inherited assets, or large sales where getting the basis right saves significant tax dollars.
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 that loss to reduce capital gains you report in the same year, or deduct up to $3,000 against other income. Losses beyond $3,000 carry forward to future years.
What if I sold something years ago and never reported it?
The IRS can assess tax and penalties for up to three years back (or longer if they suspect fraud). If you missed reporting a sale, you can file an amended return for that year. A tax professional can help you determine what you owe and the best way to resolve it with the IRS.
Does the capital gains tax rate change every year?
The tax brackets and rates are adjusted annually for inflation, so the income thresholds that determine whether you pay 0%, 15%, or 20% on long-term gains shift slightly each year. The rates themselves (0%, 15%, 20%) have remained the same since 2013, but Congress can change them at any time.
Can I avoid capital gains tax by donating the asset to charity instead of selling it?
Yes. If you donate an appreciated asset (stock, real estate, art) directly to a may have access to charity, you avoid the capital gains tax entirely and receive a charitable deduction for the asset's current value. You must own the asset for more than one year for this to work. Consult a tax professional about the best way to structure a large charitable donation.
What happens to capital gains tax when I die?
Your heirs receive a stepped-up basis equal to the asset's value on the date of your death. If they sell shortly after inheriting, they owe little or no capital gains tax, even if the asset appreciated significantly during your lifetime. This is one of the major tax benefits of inheriting assets rather than receiving them as gifts.