Capital Gains Tax on Stocks: Long-Term Rates, Losses, and NIIT

Profit from selling stock you have held for more than one year is taxed at a federal long-term capital gains rate of 0%, 15%, or 20%, depending on your total taxable income for the year. A single filer in 2026 pays 0% on long-term capital gains tax on stocks up to $49,450 of taxable income, and a married couple filing jointly pays 0% up to $98,900. Higher earners can also owe an additional 3.8% surtax, and most states tax the gain on top of that.

2026 Federal Long-Term Rates

The IRS adjusts the income thresholds each year. For the 2026 tax year, Revenue Procedure 2025-32 sets them as follows:1Internal Revenue Service. Rev. Proc. 2025-32

  • 0% on taxable income up to $49,450 (single), $98,900 (married filing jointly), or $66,200 (head of household).
  • 15% on taxable income above the 0% ceiling up to $545,500 (single), $613,700 (married filing jointly), or $579,600 (head of household).
  • 20% on taxable income above the 15% ceiling.

These rates are considerably lower than ordinary income rates, which can reach 37%. That gap is why the holding period matters so much.

What Counts as Long-Term

To get these rates, you must hold the stock for more than one year before selling. The tax code defines a long-term capital gain as profit from a capital asset held for more than twelve months.2Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses One day short and the entire gain is taxed at your ordinary rate.

The IRS counts the holding period starting the day after you buy and ending on the day you sell. For exchange-traded stock, the trade date controls, not the settlement date.3Internal Revenue Service. Publication 550 – Investment Income and Expenses Shares bought on March 10, 2025 first qualify for long-term treatment on a sale dated March 11, 2026. A sale on March 10, 2026 is exactly one year, which fails the “more than one year” test.

How the Brackets Stack With Your Other Income

The thresholds apply to your total taxable income, not to the gain alone. Ordinary income fills the brackets first, and long-term gains sit on top. A single gain can therefore land partly in one rate bracket and partly in another.

Say you are a single filer with $40,000 in wages and a $20,000 long-term gain. The first $9,450 of the gain fits inside the 0% bracket, and the remaining $10,550 is taxed at 15%.4Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed The “your rate” question rarely has a single-number answer.

The 3.8% Net Investment Income Tax

Higher earners owe an extra 3.8% on investment income, including long-term stock gains. The surtax applies once your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).5Office of the Law Revision Counsel. 26 US Code 1411 – Imposition of Tax It hits the lesser of your net investment income or the amount by which modified AGI exceeds the threshold.6Internal Revenue Service. 7Office of the Law Revision Counsel. 26 US Code 1012 – Cost Stock splits and reinvested dividends adjust it. Reinvested dividends are taxable as income when received, and each reinvestment also increases your basis because you are buying new shares.

When you own several lots of the same stock at different prices, you have a choice. The default is first-in, first-out (FIFO), which treats the oldest shares as sold first. The alternative is specific identification, where you tell your broker exactly which lots to sell.8Internal Revenue Service. Stocks (Options, Splits, Traders) Specific identification lets you pick higher-cost shares to shrink the taxable gain, but you have to identify the shares before the sale settles and the broker has to confirm the lots. Without adequate identification, FIFO applies.

Using Losses to Cut the Tax

Losses on other stock sales offset gains dollar for dollar. Long-term losses first offset long-term gains, and short-term losses first offset short-term gains; anything left over crosses to the other type. If total losses exceed total gains for the year, you can deduct up to $3,000 of net capital losses against ordinary income. Married filing separately is limited to $1,500 each.9Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses

Any loss beyond the $3,000 cap carries forward to future years and keeps its long-term or short-term character. There is no expiration.10Office of the Law Revision Counsel. 26 US Code 1212 – Capital Loss Carrybacks and Carryovers

The Wash Sale Rule

If you sell at a loss and buy the same stock, or something substantially identical, within 30 days before or after the sale, the IRS disallows the loss.11Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The window covers 61 days total: 30 before, the sale date, and 30 after.

The disallowed loss is not gone. It gets added to the basis of the replacement shares, deferring the benefit until you sell those shares without triggering another wash sale. Contracts and options to acquire the same stock also count, and automatic dividend reinvestment on the same stock can quietly trip the rule during a loss-harvesting sale.

Inherited Stock Is Different

Stock you inherit does not follow the normal rules. The basis resets to fair market value on the date of the original owner’s death, no matter what they paid.12Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent Shares your parent bought for $10,000 that were worth $80,000 at death give you a basis of $80,000, so a sale at $82,000 produces only $2,000 of gain.

Inherited stock also gets automatic long-term treatment, even if you sell the next day.13Office of the Law Revision Counsel. 26 USC 1223 – Holding Period of Property The step-up also runs the other way: if the stock had fallen in value before death, the basis steps down.

Paying Tax on a Large Gain During the Year

Paycheck withholding usually will not cover the tax on a big sale. The IRS expects you to pay as you earn, so a large gain in, say, June may require a quarterly estimated payment rather than a check in April. Underpayment triggers an interest-based penalty calculated separately for each quarterly due date.14Internal Revenue Service. Topic No. 306, Penalty for Underpayment of Estimated Tax

You avoid the penalty by hitting one of these safe harbors:

  • Owe less than $1,000 in tax after withholding and credits.
  • Pay at least 90% of the current year’s tax through withholding and estimates.
  • Pay at least 100% of last year’s tax, or 110% if your prior-year AGI exceeded $150,000.

The prior-year safe harbor is the practical one when a big gain is coming and you cannot predict the exact number. Cover last year’s liability (with the 10% bump if it applies) and the penalty is off the table even if the final bill is much larger.

State Tax on Top

Federal is only part of the bill. Most states tax long-term gains as ordinary income, and only a few states impose no tax on capital gains. Check your state’s rules before assuming the federal brackets tell the whole story.

Reporting the Sale

Your brokerage sends Form 1099-B after year end, listing each sale with purchase and sale dates, gross proceeds, and cost basis for shares acquired after 2010.15Internal Revenue Service. About Form 1099-B, Proceeds From Broker and Barter Exchange Transactions For older shares the broker was not required to track, you determine and report basis from your own records.

The details move to Form 8949, one line per sale, with a code showing whether basis was reported to the IRS.16Internal Revenue Service. Instructions for Form 8949 Totals from Form 8949 then flow to Schedule D, where long-term and short-term results are netted to produce the numbers that feed your Form 1040.17Internal Revenue Service. Form 8949 – Sales and Other Dispositions of Capital Assets