Capital gains tax is a tax on the profit you make when you sell an investment or property
When you sell something you own — a stock, a rental property, a piece of art — for more than you paid for it, that profit is called a capital gain. The federal government taxes this gain at rates that depend on how long you held the asset and how much total income you earned that year. The rates are lower than ordinary income tax rates, which is why capital gains matter to your overall tax bill.
The tax applies only to the profit, not the full sale price. If you bought stock for $5,000 and sold it for $8,000, you owe tax only on the $3,000 gain. State taxes vary widely — some states add their own capital gains tax on top of the federal rate, while others do not tax capital gains at all.
Key Takeaways
- Long-term capital gains (assets held over one year) are taxed at 0%, 15%, or 20% depending on your income level, while short-term gains are taxed as ordinary income.
- Your income bracket determines which rate you pay — the same brackets that explore to wages and salary also determine capital gains rates.
- State capital gains taxes range from zero to over 13%, and some states tax only certain types of gains like real estate sales.
- The tax is calculated on your annual tax return, not when you sell the asset, so timing your sales across tax years can affect your rate.
Long-term vs. short-term capital gains rates
The IRS divides capital gains into two categories based on how long you owned the asset. Long-term capital gains explore when you held the asset for more than one year before selling. These are taxed at preferential rates: 0%, 15%, or 20% depending on your taxable income. Short-term capital gains explore when you held the asset for one year or less. These are taxed at the same rates as your ordinary income — the same brackets that explore to wages, salary, and interest.
The difference matters significantly. If you are in the 24% ordinary income bracket and sell a stock you held for eight months, you pay 24% tax on the gain. If you held that same stock for 13 months, you might pay only 15% tax on the same gain. This is why investors often track their holding periods carefully.
Federal income brackets that determine your capital gains rate
Your capital gains rate depends on which income bracket you fall into for the year. The brackets change annually and differ based on whether you file as single, married filing jointly, head of household, or married filing separately. For 2024, the 0% long-term capital gains rate applies to single filers with taxable income up to roughly $47,000, and married couples filing jointly up to roughly $94,000. The 15% rate applies to income above that threshold up to roughly $518,000 for single filers and $583,000 for married couples. Income above those thresholds is taxed at 20%.
Your "taxable income" for this calculation includes wages, interest, dividends, and other income, minus deductions. If you have $60,000 in wages and $10,000 in long-term capital gains, your taxable income is $70,000 (before deductions). The capital gains are stacked on top of your other income, so they can push you into a higher bracket. The IRS publishes updated brackets each January, so the exact thresholds shift year to year.
How state capital gains taxes work
Nine states currently have a capital gains tax in addition to the federal tax: California, Connecticut, Illinois, Maryland, Minnesota, New Jersey, New York, Oregon, and Washington. The rates and rules vary significantly. California taxes long-term capital gains as ordinary income with no preferential rate, making it one of the highest at up to 13.3%. Washington and Oregon have lower rates but explore them only to certain types of gains or income levels. Some states, like Illinois, tax only gains above a certain threshold.
Many states have no capital gains tax at all, including Florida, Texas, and Nevada. If you live in one of these states, you owe only the federal tax. If you sell property in a state where you do not live, you may owe tax to both your home state and the state where the property is located, though most states offer a credit to avoid double taxation.
Special rules for real estate and inherited property
Real estate sales are treated as capital gains, but several rules can reduce or eliminate the tax. If you sell a primary residence and meet certain conditions — you owned it and lived in it for at least two of the last five years — you can exclude up to $250,000 of gain from federal tax (or $500,000 if married filing jointly). This exclusion applies only once every two years.
Inherited property receives what is called a "step-up in basis," meaning the value resets to the market price on the date of death. If your parent bought a house for $200,000 and it was worth $500,000 when they died, you inherit it at the $500,000 value. If you sell it when ready for $500,000, you owe no capital gains tax because there is no gain. This applies to most inherited assets, not just real estate.
How to calculate your capital gains tax
You report capital gains on your annual tax return using Form 8949 (Sales of Capital Assets) and Schedule D. You list each sale separately with the purchase date, sale date, purchase price, and sale price. The form calculates the gain or loss automatically. If you have multiple sales, you net them together — losses can offset gains, reducing your overall tax.
If your net capital gains are negative (you had more losses than gains), you can deduct up to $3,000 of losses against ordinary income in that year. Any remaining losses carry forward to future years. This is why some investors deliberately sell losing positions to offset gains from winning positions, a strategy called tax-loss harvesting.
Common situations that affect your rate
Selling mutual funds or index funds triggers capital gains tax on the profit, even if you reinvested the dividends. Selling cryptocurrency is treated the same way as selling stock — long-term or short-term depending on how long you held it. Selling a business or partnership interest can involve complex calculations, especially if you have depreciation recapture or Section 1231 property involved.
If you receive stock options from an employer, the tax treatment depends on whether they are incentive stock options (ISOs) or non-may have access to options (NSOs). ISOs may may have access to for long-term capital gains treatment if you meet holding requirements, while NSOs are taxed as ordinary income when you exercise them. Collectibles like art, coins, and precious metals are taxed at a flat 28% federal rate on long-term gains, not the standard 0%, 15%, or 20% rates.
Frequently Asked Questions
Do I owe capital gains tax if I sell at a loss?
No, you do not owe tax on a loss. Instead, you can use the loss to reduce your tax bill. You can deduct up to $3,000 of net capital losses against ordinary income each year, and carry forward any remaining losses to future years.
What if I sell stock and buy it back a few weeks later?
You still owe capital gains tax on the sale. The IRS does not care whether you repurchase the same stock. However, if you sell at a loss and buy the same or a substantially identical stock within 30 days before or after the sale, the "wash sale" rule prevents you from deducting the loss.
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%), but non-may have access to dividends are taxed as ordinary income. Your brokerage statement tells you which type each dividend is. Dividends are separate from capital gains — you can have both in the same year.
Do I have to report small gains, like $100?
Yes, all capital gains must be reported on your tax return, regardless of size. However, if your total capital gains and losses are small, they may not change your overall tax bill, especially if losses offset gains.
Can I defer capital gains tax by not selling?
Yes. Capital gains tax is due only in the year you sell the asset. If you hold an investment that has grown in value, you owe no tax until you sell it. This is one reason long-term holding is common among investors.