Federal long-term capital gains tax rates in 2024
The federal tax rate on long-term capital gains depends on your total taxable income for the year, not on the gains alone. There are three brackets: 0%, 15%, and 20%. Your income determines which bracket you fall into, and that bracket applies to your gains.
For 2024, the 0% rate applies to single filers with taxable income up to $47,025, married filing jointly up to $94,050, and heads of household up to $62,975. The 15% rate applies to income above those thresholds up to $518,900 (single), $583,750 (married filing jointly), and $551,350 (head of household). Anything above those upper limits is taxed at 20%.
These income thresholds adjust each year for inflation. The rates themselves—0%, 15%, and 20%—have remained the same since 2013, though Congress can change them. State and local taxes on capital gains are separate and vary by location.
Key Takeaways
- Long-term capital gains are taxed at 0%, 15%, or 20% federally, determined by your total taxable income for the year, not the size of the gain itself.
- The income thresholds that determine your rate change annually and are different for single filers, married couples, and heads of household.
- You must hold an asset for more than one year for the gain to may have access to as long-term; anything shorter is taxed as ordinary income at your regular tax rate.
- State and local capital gains taxes exist in some states and are calculated separately from federal tax.
- Net Investment Income Tax (3.8%) may apply if your modified adjusted gross income exceeds certain thresholds, adding to your federal burden.
How holding period affects your tax rate
The difference between long-term and short-term capital gains is the length of time you owned the asset. If you buy a stock on January 15 and sell it on January 16 of the following year, that is short-term. If you sell it on January 16 two years later, that is long-term.
Short-term gains are taxed as ordinary income at your regular income tax rate, which can be as high as 37% federally. Long-term gains use the lower 0%, 15%, or 20% brackets. This difference can be substantial. A $10,000 gain taxed as short-term at the 37% rate costs $3,700 in federal tax. The same gain at the 15% long-term rate costs $1,500.
The holding period clock starts the day after you purchase the asset and ends the day you sell it. Fractional days do not count. If you are close to the one-year mark, the timing of your sale matters.
State and local capital gains taxes
Most states do not have a separate capital gains tax. They tax gains as part of ordinary income using their regular income tax brackets. A few states—California, Hawaii, Illinois, Maryland, Minnesota, New Jersey, New York, Oregon, Vermont, and Washington—have enacted or are implementing dedicated capital gains taxes on top of their income tax systems.
Washington's capital gains tax, for example, applies a 7% rate to long-term gains on the sale of certain assets (primarily stocks and bonds) when the gain exceeds $250,000 in a single year. New York's rate is 8.82% on gains over $1 million. These rates and thresholds vary by state and change over time.
If you live in a state with no income tax—such as Florida, Texas, or Wyoming—you owe no state capital gains tax. If you sell an asset while living in one state and move to another before the sale settles, the state where you lived at the time of sale generally determines your tax obligation.
Net Investment Income Tax and high earners
Individuals with modified adjusted gross income (MAGI) above certain thresholds pay an additional 3.8% Net Investment Income Tax (NIIT) on top of the regular capital gains rate. For 2024, the threshold is $200,000 for single filers and $250,000 for married couples filing jointly.
This tax applies to the lesser of your net investment income or the amount by which your MAGI exceeds the threshold. If you are a single filer with $220,000 in MAGI and $50,000 in long-term capital gains, the NIIT applies to $20,000 of the gain (the amount your income exceeds $200,000). At 3.8%, that is $760 in additional tax.
NIIT is separate from your regular income tax and capital gains tax. It is calculated on your tax return and paid to the IRS along with your other taxes. Not all investment income counts toward NIIT—for example, gains on the sale of your primary residence are generally excluded.
How to calculate your tax on a specific gain
Start by determining your total taxable income for the year, including wages, interest, dividends, and the capital gain itself. Next, identify which tax bracket your income falls into based on your filing status. That bracket determines the rate applied to your long-term gain.
If your gain pushes you into a higher bracket, part of the gain may be taxed at one rate and part at another. For example, a single filer with $40,000 in taxable income and a $20,000 long-term gain has $60,000 total. The first $7,025 of the gain is taxed at 0% (to reach the $47,025 threshold), and the remaining $12,975 is taxed at 15%. The total federal tax on the gain is $1,946.25.
After calculating federal tax, add any state or local capital gains tax owed. Then check whether NIIT applies. Your tax software or a tax professional can handle these calculations, but understanding the structure helps you see where the numbers come from.
Losses and how they offset gains
If you sell an asset at a loss, you can use that loss to reduce your taxable gains. If you have $30,000 in long-term gains and $10,000 in long-term losses in the same year, your net long-term gain is $20,000, and that is what you pay tax on.
You can also use losses to offset short-term gains, and vice versa. Long-term and short-term gains and losses are netted together. If your losses exceed your gains in a year, you can deduct up to $3,000 of the net loss against ordinary income. Any loss beyond $3,000 carries forward to future years and can be used to offset future gains or deducted against ordinary income in those years.
This strategy—selling losing positions to offset gains—is called tax-loss harvesting. It is legal and common, though it requires tracking your cost basis and holding periods carefully.
Special cases: collectibles, real estate, and may have access to small business stock
Most long-term capital gains use the 0%, 15%, or 20% rates. Some assets have different rules. Collectibles—art, antiques, coins, stamps—are taxed at a maximum 28% rate on long-term gains, even if your regular long-term rate would be lower.
If you sell rental property or investment real estate, you may owe depreciation recapture tax at 25% on the portion of the gain that comes from depreciation deductions you claimed in prior years. The remaining gain uses the standard long-term rates.
Gains on may have access to small business stock held for more than five years may be partially or fully excluded from tax under Section 1202, though this benefit phases out for higher-income taxpayers. These exceptions are narrow and have specific requirements. A tax professional can determine whether your situation qualifies.
Frequently Asked Questions
Do I owe capital gains tax if I reinvest the money?
Yes. The tax is owed when you sell the asset, regardless of what you do with the proceeds. Reinvesting the money does not defer or eliminate the tax. You owe tax on the gain in the year you sell, even if you immediately buy another investment with the money.
What if I inherited stock—do I owe capital gains tax when I sell it?
Inherited assets receive a "step-up in basis," meaning your cost basis is the asset's value on the date of death, not what the original owner paid. If you inherit stock worth $50,000 and sell it for $52,000 a month later, your gain is $2,000, not the gain the original owner would have had. This step-up applies to most inherited assets and can significantly reduce or eliminate capital gains tax.
Can I avoid capital gains tax by donating the asset to charity instead of selling it?
Yes. If you donate appreciated stock or other assets directly to a may have access to charity, you avoid capital gains tax on the gain and can deduct the full fair market value of the asset as a charitable contribution. You must donate the asset itself, not the proceeds from selling it. This strategy works best for highly appreciated assets.
Are capital gains taxed differently if I'm retired?
No. The tax rates are the same regardless of your employment status. However, your total taxable income in retirement determines which bracket you fall into. If you have low income in retirement, you may fall into the 0% long-term capital gains bracket, meaning you owe no federal tax on gains up to the threshold for your filing status.
What happens if I sell an asset at a loss—can I deduct it from my taxes?
You can use losses to offset gains dollar-for-dollar. If losses exceed gains, you can deduct up to $3,000 of the net loss against ordinary income in that year. Losses beyond $3,000 carry forward indefinitely to future years. You cannot deduct losses from personal-use property, such as your primary home.