How are long-term capital gains taxed?

Last updated August 2026

Short answer

A long-term capital gain arises when you sell an investment held for more than one year at a profit. For 2026 the rates are 0%, 15% and 20%. Single filers pay 0% up to $49,450 of taxable income, 15% up to $545,500, and 20% above that; married couples filing jointly have thresholds of $98,900 and $613,700. The gain stacks on top of your other income rather than being taxed separately.

The long-term rate is the single largest tax advantage available to an ordinary investor, and the only thing you have to do to earn it is wait. Understanding how the brackets stack is what makes it usable.

The 2026 rates

Filing status0% rate15% rate20% rate
SingleUp to $49,450$49,450 to $545,500Above $545,500
Married filing jointlyUp to $98,900$98,900 to $613,700Above $613,700
Head of householdUp to $66,200$66,200 to $579,600Above $579,600
Married filing separatelyUp to $49,450$49,450 to $306,850Above $306,850
Estates and trustsUp to $3,300$3,300 to $16,250Above $16,250

These thresholds are measured against taxable income, which is after deductions, not gross salary.

High earners may also owe the 3.8% net investment income tax above $200,000 of modified AGI for single filers and $250,000 for joint filers, which effectively makes the top rate 23.8%.

The gain stacks, it is not taxed separately

This is the part most explanations skip. Your long-term gain does not get its own private set of brackets. It sits on top of your ordinary income, and the brackets are applied to the total.

So a single filer with $40,000 of taxable ordinary income and a $20,000 long-term gain does not pay 0% on the whole gain. The first $9,450 of gain fills the remainder of the 0% band up to $49,450, and the other $10,550 is taxed at 15%.

The practical consequence is that a year with low ordinary income, a sabbatical, a career break, early retirement before pensions start, is a year when gains can be realised unusually cheaply.

The one-year line is exact

The holding period runs from the day after you acquired the investment through the day you sell it. More than one year qualifies; exactly one year does not.

Because the difference between long-term and short-term treatment can be twenty percentage points or more, the calendar is often worth more than the trade. Selling a week before the anniversary to capture a slightly better price frequently loses money after tax.

Shares acquired at different times have different holding periods. Selling part of a position lets you choose which lots go, which is covered on the cost basis page.

Losses offset gains first

Realised capital losses offset realised gains dollar for dollar, long-term against long-term first, then across categories. If losses exceed gains, up to $3,000 a year can be deducted against ordinary income and the remainder carries forward indefinitely.

That carryforward never expires, which makes a bad year genuinely useful later. It is also why keeping records of realised losses matters even in years when they cannot all be used.

Try it in Walnut

Walnut reads the positions in your connected brokerage, so before you sell you can see what you hold and how long you have held it.

What is not a capital gain

Selling inside a retirement account produces no capital gain at all. There is nothing to report and no rate to worry about.

Collectibles, including gold and silver bullion and the ETFs that hold physical metal, are taxed at a higher maximum rate rather than the 20% ceiling. Investors who buy a gold ETF expecting normal capital gains treatment are often surprised.

Property that was your main home has its own exclusion, and depreciated rental property carries recapture rules, both outside the scope of ordinary investment gains.

Gain harvesting in the 0% band

The 0% band is not a rounding detail. A single filer with modest taxable income can realise a long-term gain and owe nothing federally on it.

Deliberately selling and immediately repurchasing to use that band raises your cost basis at no tax cost, which reduces the taxable gain on a future sale in a higher-income year. This is gain harvesting, the mirror image of loss harvesting.

The wash sale rule does not block it, because that rule applies to losses, not gains. What it does require is care about the knock-on effects: a realised gain raises modified AGI, which can affect health insurance subsidies, student loan calculations and other income-tested thresholds.

State tax is a separate question

These rates are federal. Most states tax capital gains as ordinary income with no preferential long-term rate, so a gain taxed at 15% federally can carry a state charge on top.

A handful of states levy no income tax at all, and a few apply their own reduced rate or exclusion. The combined figure is what actually matters when you are deciding whether to realise a gain.

Moving state before a large sale is a well-known planning move and a heavily scrutinised one; residency is determined by facts rather than by a mailing address.

Mutual fund distributions can create a gain you did not choose

A mutual fund that sells holdings at a profit must distribute those realised gains to shareholders, usually in December. You owe tax on the distribution even if you never sold a share, and even if the fund itself is down for the year.

Buying a fund in November can therefore hand you a taxable long-term gain a few weeks later on growth you were not there for. Funds publish estimated distributions in advance, which makes this avoidable if you check.

ETFs largely avoid the problem through their creation and redemption mechanism, which is a substantial part of why they are described as more tax-efficient than equivalent mutual funds. Inside a retirement account the difference is irrelevant; in a taxable account it is worth real money over time.

What to check before selling

Three things decide the bill, and all three are knowable in advance. How long you have held the lot you intend to sell. What your taxable income looks like this year against the band thresholds. And whether you have realised losses, or carried-forward ones, that the gain can be set against.

None of that requires a projection of the market. It is arithmetic on numbers you already have, and it is the part of investing where a small amount of attention reliably pays.

Sources

Capital gains rates and holding periods are in IRS Topic 409. Dividend classification, the wash sale rule, cost basis and 1099 reporting are covered in IRS Publication 550. 2026 thresholds are taken directly from IRS Revenue Procedure 2025-32, section .03, Maximum Capital Gains Rate. Walnut is informational and is not an investment adviser. This guide is educational and not personalized tax or investment advice; anything with a tax consequence is worth confirming with a tax professional.

FAQ

What is the long-term capital gains tax rate for 2026?

+

0%, 15% or 20% depending on taxable income. For single filers the 0% band runs to $49,450 and the 15% band to $545,500. For married couples filing jointly the thresholds are $98,900 and $613,700. A 3.8% net investment income tax can apply above $200,000 and $250,000 of modified AGI.

How long do I have to hold an investment for long-term treatment?

+

More than one year, measured from the day after acquisition to the day of sale. Exactly one year is not enough. Because the rate difference is often twenty percentage points or more, waiting past the anniversary is frequently worth more than any price movement in that window.

Does a capital gain push me into a higher tax bracket?

+

It can affect which capital gains band applies, because the gain stacks on top of your ordinary income when the thresholds are measured. It does not change the rate on your ordinary income itself, but it can raise your modified AGI enough to trigger the 3.8% surcharge or other income-tested thresholds.

Can I avoid capital gains tax entirely?

+

In some cases yes. Gains realised inside a retirement account are not taxed, and a long-term gain that falls entirely inside the 0% band is taxed at nothing. Offsetting gains with realised losses is the other lever. A tax professional can confirm what applies to your situation.

Related guides

    How are long-term capital gains taxed? - Walnut AI Investing App