Long-term capital gains tax rates on stocks are 0%, 15%, or 20% at the federal level, with the rate you pay determined by your total taxable income and filing status. Hold the shares for more than one year before selling and the gain qualifies for these preferential rates instead of your ordinary income rate, which tops out at 37%. Higher earners may owe an additional 3.8% Net Investment Income Tax, pushing the maximum federal rate on equity profits to 23.8%.
The One-Year Holding Period
Federal tax law defines a long-term capital gain as profit from selling a capital asset held for more than one year.1Office of the Law Revision Counsel. 26 U.S.C. 1222 – Other Terms Relating to Capital Gains and Losses Your holding period starts the day after you buy the shares and includes the day you sell them. Buy stock on March 1, 2026, and the earliest you can sell it as a long-term holding is March 2, 2027.
Miss that date by a single day and the entire gain gets taxed at your ordinary income rate. For someone in the 35% or 37% bracket, the gap between that and the 15% or 20% long-term rate is substantial. Most brokerages track holding periods automatically and flag which lots qualify as long-term, but verifying the dates yourself before placing a sell order is worth the minute it takes, particularly around the one-year mark.
2026 Income Thresholds
The IRS adjusts the income cutoffs for each rate each year for inflation. For the 2026 tax year:2Internal Revenue Service. Rev. Proc. 2025-32
0% Rate
- Single: taxable income up to $49,450
- Married filing jointly: up to $98,900
- Head of household: up to $66,200
- Married filing separately: up to $49,450
15% Rate
- Single: $49,451 to $545,500
- Married filing jointly: $98,901 to $613,700
- Head of household: $66,201 to $579,600
- Married filing separately: $49,451 to $306,850
20% Rate
Taxable income above the 15% ceiling for your filing status pushes the top portion of your long-term gain into the 20% rate.3Office of the Law Revision Counsel. 26 U.S.C. 1 – Tax Imposed
One detail trips people up: the thresholds are based on your total taxable income, not just the gain itself. Wages, business income, retirement distributions, and other taxable income all count toward pushing your capital gains into higher brackets. A $30,000 long-term gain might be taxed at 0% for a retiree with modest income and at 15% or 20% for someone who also earned a high salary that same year.
The 3.8% Net Investment Income Tax
On top of the standard rates, higher earners owe a 3.8% surtax on net investment income. It kicks in when your modified adjusted gross income exceeds $200,000 filing single or $250,000 filing jointly.4Office of the Law Revision Counsel. 26 U.S.C. 1411 – Imposition of Tax The 3.8% applies to the lesser of your net investment income or the amount by which your modified AGI exceeds the threshold.
Net investment income includes capital gains, dividends, interest, rental income, and royalties.5Internal Revenue Service. Questions and Answers on the Net Investment Income Tax Someone already in the 20% capital gains bracket ends up at a combined federal rate of 23.8% on long-term equity gains. You calculate the surtax on Form 8960.
Unlike the capital gains brackets, the $200,000 and $250,000 NIIT thresholds are not indexed for inflation. They have stayed put since the tax took effect in 2013, so more taxpayers cross those lines each year as nominal incomes rise.
Figuring the Taxable Gain
Your taxable gain is not the full sale price. It is the sale price minus your cost basis, which is generally what you paid for the shares plus transaction costs like brokerage commissions.6Office of the Law Revision Counsel. 26 U.S.C. 1012 – Basis of Property – Cost Buy 100 shares at $100 each with a $10 commission and your basis is $10,010. Sell later for $15,000 with another $10 fee and your taxable long-term gain is $4,980.
When you own multiple lots of the same stock bought at different prices, which lot you sell changes the gain and possibly the rate. The default at most brokerages is first-in, first-out, which assumes your oldest shares go first. You can instead use specific identification and pick the lot. Selling a higher-cost lot produces a smaller gain and a lower tax bill, but you have to designate the lot at the time of sale, not after.
Brokerages report your cost basis to the IRS on Form 1099-B for shares acquired after January 1, 2011. You reconcile the numbers on Form 8949, and the totals flow to Schedule D on your return.7Internal Revenue Service. About Form 8949, Sales and Other Dispositions of Capital Assets If a brokerage reports an incorrect basis, you can adjust it on Form 8949 with documentation.
Using Capital Losses to Reduce the Bill
Capital losses reduce taxable gains dollar for dollar, but the netting follows a set sequence. Short-term losses first offset short-term gains, and long-term losses first offset long-term gains. Only after netting within each category do leftover losses cross over.8Internal Revenue Service. Topic No. 409, Capital Gains and Losses
If your total losses for the year exceed your total gains, you can deduct up to $3,000 of the excess against ordinary income ($1,500 if married filing separately).9Office of the Law Revision Counsel. 26 U.S.C. 1211 – Limitation on Capital Losses Anything left over carries forward indefinitely. There is no expiration. You keep applying it against future gains and, when losses still exceed gains, deducting up to $3,000 a year until it is used up. Keep copies of prior-year Schedule D forms so the carryover is easy to reconstruct.
The Wash Sale Trap
Sell a stock at a loss and buy the same or a substantially identical security within 30 days before or after the sale, and the IRS disallows the loss deduction.10Office of the Law Revision Counsel. 26 U.S.C. 1091 – Loss From Wash Sales of Stock or Securities The 30-day window runs both directions, creating a 61-day blackout period around the sale date. The disallowed loss is not gone; it gets added to the basis of the replacement shares. But if you were counting on the loss to offset a gain in the current tax year, the timing matters.
Qualified Dividends Get the Same Rates
Dividends from most U.S. stocks and many foreign corporations are taxed at the same 0%, 15%, or 20% rates as long-term capital gains, as long as they meet a holding period test.11Internal Revenue Service. Topic No. 404, Dividends and Other Corporate Distributions To qualify, you must hold the stock for more than 60 days during the 121-day period beginning 60 days before the ex-dividend date. Dividends that fail the test are taxed as ordinary income. Your brokerage reports which dividends qualified on Form 1099-DIV. At the 22% ordinary bracket, a $5,000 dividend taxed as ordinary income costs $1,100 in federal tax; the same amount at the 15% qualified rate costs $750.
Inherited Stock Resets the Basis
Inherit stock and your cost basis is not what the deceased person originally paid. It resets to the fair market value on the date of death.12Office of the Law Revision Counsel. 26 U.S.C. 1014 – Basis of Property Acquired From a Decedent If your parent bought shares for $5,000 decades ago and they were worth $50,000 at death, your basis is $50,000. Sell the next week for $50,500 and you owe tax on $500 of gain. All those decades of appreciation are never taxed. Any gain you realize when selling inherited stock is treated as long-term regardless of how soon after death you sell.
Where These Rates Don’t Apply
The 0/15/20% schedule is for stocks, mutual funds, ETFs, and similar equity investments in taxable accounts. A few situations sit outside it.
Long-term gains on collectibles (art, antiques, coins, gems, stamps, precious metals, fine wine) are capped at a maximum 28% rate.3Office of the Law Revision Counsel. 26 U.S.C. 1 – Tax Imposed If your regular long-term rate would be lower, you pay the lower rate; you just cannot access the 20% ceiling standard equity investors get. The 3.8% NIIT can stack on top.
Stocks held inside a 401(k), traditional IRA, or Roth IRA are not subject to capital gains tax at all when you buy and sell within the account. With a traditional 401(k) or IRA, you pay ordinary income tax on withdrawals in retirement no matter how the growth came about. With a Roth IRA, qualified withdrawals are tax-free. That makes the long-term capital gains rate relevant mainly for taxable brokerage accounts.
State Taxes Come on Top
Federal rates are only part of the picture. Most states tax capital gains as ordinary income, with rates running from roughly 1% to over 13% depending on the state. A few states impose no income tax at all, so residents keep the full benefit of the lower federal rates. Only a handful offer a preferential state rate for long-term gains. Two investors with identical portfolios and identical federal tax bills can end up with very different after-tax returns based purely on where they live, so checking your state’s treatment before a large sale closes is worth the time.