What Is the Tax on Capital Gains for Stocks?

The federal tax on capital gains from stocks is 0%, 15%, or 20% if you owned the shares for more than a year before selling, and 10% to 37% (your ordinary income rate) if you owned them for a year or less. Higher earners owe an additional 3.8% surtax on investment income, and most states add their own tax on top. Which long-term rate applies depends on your total taxable income and filing status.

The One-Year Line

The IRS splits stock profits into two categories based on how long you held the shares. Sell after one year or less and the gain is short-term, taxed as ordinary income. Hold for more than a year and it becomes a long-term capital gain, taxed at the preferential rates.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses

The clock starts the day after you buy and runs through the day you sell.1Internal Revenue Service. Topic No. 409, Capital Gains and Losses Buy on January 1 and the earliest you can sell for long-term treatment is January 2 of the following year. One day short and the whole gain falls into the ordinary income brackets, which for higher earners can nearly double the rate.

Short-Term Rates

Short-term gains get no discount. The IRS folds them into your wages and other ordinary income and taxes the total through the regular brackets. For 2026, those brackets run from 10% on the lowest income up to 37% on taxable income above $640,600 for single filers and $768,700 for married couples filing jointly.2Internal Revenue Service. Revenue Procedure 2025-32

Someone in the 35% or 37% bracket who sells six months in gives back more than a third of the profit. The same gain, held past the one-year mark, would likely be taxed at 15% or 20%.

Long-Term Rates and Income Thresholds

Long-term stock gains fall into one of three federal brackets: 0%, 15%, or 20%. Your total taxable income and filing status decide which one applies. The 2026 thresholds are:2Internal Revenue Service. Revenue Procedure 2025-32

  • 0% rate: taxable income up to $49,450 (single) or $98,900 (married filing jointly).
  • 15% rate: taxable income from $49,451 to $545,500 (single) or $98,901 to $613,700 (married filing jointly).
  • 20% rate: taxable income above $545,500 (single) or above $613,700 (married filing jointly).

Most investors land in the 15% bracket. The 0% rate is worth planning around in years with lower income, since a sale of appreciated stock that keeps your total below the threshold can produce zero federal tax on the gain. The IRS adjusts these thresholds each year for inflation.

The 3.8% Net Investment Income Tax

Higher earners owe an extra 3.8% on top of the capital gains rate. This surtax applies when modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly), and it hits the smaller of your net investment income or the amount by which your MAGI crosses the threshold.3Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax4Internal Revenue Service. Questions and Answers on the Net Investment Income Tax

These thresholds aren’t indexed for inflation. They’ve stayed put since the tax took effect in 2013, so more taxpayers cross the line each year as wages rise. Stack the surtax on top of the 20% long-term rate and the effective federal rate on stock gains reaches 23.8%.

State Tax on Top

Federal is only part of the bill. Most states tax capital gains as ordinary income, adding roughly 2% to more than 13% depending on where you live. Nine states have no individual income tax, though one of those still imposes a separate tax on capital gains for high earners. A few states apply a reduced rate to long-term gains compared with wages. The combined federal and state hit varies enough that your state’s rules deserve a look before you sell.

Using Losses to Reduce the Tax

If you sold other stocks at a loss the same year, those losses offset your gains dollar for dollar. Short-term losses cancel short-term gains first, and long-term losses cancel long-term gains first. Any net loss left over can offset up to $3,000 of ordinary income per year ($1,500 if married filing separately).5Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Losses above the $3,000 cap carry forward indefinitely to future years, keeping their short-term or long-term character until used up.6Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers

One trap: the wash sale rule. Sell a stock at a loss and buy the same or substantially identical security within 30 days before or after the sale, and the IRS disallows the loss. The disallowed amount is added to the cost basis of the replacement shares instead.7Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

Stocks Held in Retirement Accounts

None of the rates above apply to sales inside a traditional IRA, Roth IRA, 401(k), or Roth 401(k). Buying and selling within those accounts triggers no capital gains tax at all. Traditional accounts tax withdrawals in retirement as ordinary income; qualified Roth withdrawals come out tax-free. If you’re comparing what you’ll owe on a stock sale, the answer depends first on which type of account it’s in.

Paying the Tax on Time

A large stock sale mid-year can create a tax bill that withholding won’t cover, and waiting until April can trigger an underpayment penalty. The IRS generally expects quarterly estimated payments if you’ll owe at least $1,000 after withholding and refundable credits, and your withholding won’t cover at least 90% of your current-year tax or 100% of your prior-year tax (110% if prior-year AGI exceeded $150,000).8Internal Revenue Service. 2026 Form 1040-ES

The 2026 due dates are April 15, June 15, September 15, and January 15, 2027.8Internal Revenue Service. 2026 Form 1040-ES Realize a gain in August and you can catch up on the September and January payments; you don’t have to go back and cover earlier quarters. Another option: ask your employer to increase W-2 withholding for the rest of the year. The IRS treats withholding as paid evenly across the year no matter when it’s actually taken out, which sidesteps the estimated payment paperwork.