What Is Capital Gains Tax on Stocks? Rates, Losses, and Exemptions

Federal capital gains tax on stocks runs from 0% to 20% on shares you held longer than a year, and from 10% to 37% on shares you held a year or less. Your exact rate depends on two things: how long you owned the stock before selling, and your total taxable income for the year. Simply watching a stock rise in value creates no tax. The bill only comes due when you sell.

Why the One-Year Mark Matters So Much

Federal law splits stock profits into two categories at exactly one year. Profits on stock held more than a year are long-term capital gains. Profits on stock held a year or less are short-term.1Office of the Law Revision Counsel. 26 USC 1222 – Definitions Your holding period starts the day after you buy and ends the day you sell. Selling on the one-year anniversary is still short-term. You need at least a year and a day.

The gap between the two categories is wide. Short-term gains stack onto your wages and get taxed at ordinary income rates, which top out at 37%. Long-term gains max out at 20%, and plenty of investors pay 15% or even 0%. On a large sale, holding a few extra days can be worth thousands.

Long-Term Capital Gains Rates for 2026

Long-term gains fall into one of three tiers based on your taxable income for the year.2Office of the Law Revision Counsel. 26 USC 1 – Tax Imposed The income cutoffs adjust each year for inflation. For 2026:3Internal 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 $613,700 (married filing jointly)

Head of household filers and married individuals filing separately have their own thresholds that sit between these figures. The 0% band is worth knowing about. If your total taxable income stays below the cutoff, you owe nothing federal on long-term stock gains. Retirees with modest income often land here, and some investors intentionally time sales to stay inside the bracket.

The 3.8% Surtax on Higher Earners

On top of the regular rate, a 3.8% net investment income tax applies to investment earnings, including capital gains. It hits the lesser of your net investment income or the amount by which your modified adjusted gross income exceeds $200,000 (single) or $250,000 (married filing jointly).4Office of the Law Revision Counsel. 26 USC 1411 – Imposition of Tax These thresholds are written into the statute and never adjust for inflation.

An investor in the top 20% bracket who also triggers the surtax pays a combined federal rate of 23.8% on long-term gains. Someone in the 15% bracket who crosses the income threshold pays 18.8%.

Short-Term Capital Gains Rates for 2026

Stock held a year or less is taxed at your regular income tax rate. The profit gets added to wages, interest, and any other income, then flows through the same seven brackets. For 2026:5Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026

  • 10%: up to $12,400 (single) or $24,800 (married filing jointly)
  • 12%: $12,401 to $50,400 (single) or $24,801 to $100,800 (married filing jointly)
  • 22%: $50,401 to $105,700 (single) or $100,801 to $211,400 (married filing jointly)
  • 24%: $105,701 to $201,775 (single) or $211,401 to $403,550 (married filing jointly)
  • 32%: $201,776 to $256,225 (single) or $403,551 to $512,450 (married filing jointly)
  • 35%: $256,226 to $640,600 (single) or $512,451 to $768,700 (married filing jointly)
  • 37%: over $640,600 (single) or over $768,700 (married filing jointly)

A big short-term gain can pull part of your income into a higher bracket than usual. If you earn $80,000 in salary and take a $40,000 short-term profit, that profit stacks on top of your wages and some of it may land in the 24% bracket rather than the 22% you’re used to.

Figuring the Actual Gain

Your taxable gain is what you sold for minus your cost basis. Cost basis is essentially what you paid for the shares, including brokerage commissions and fees at purchase. Stock splits adjust your per-share basis downward. Reinvested dividends add to your total basis, because those dividends bought additional shares at market prices.

Say you bought 100 shares at $30 and later sold them all at $50. Your gain is $2,000: the $5,000 sale price minus the $3,000 basis. That calculation runs for every sale during the year, so clean records of purchase dates and prices matter.

Picking Which Shares to Sell

When you’ve bought the same stock at different times and different prices, which shares get “sold” changes your tax bill. The default is first-in, first-out (FIFO): your oldest shares are treated as sold first.6Internal Revenue Service. Stocks (Options, Splits, Traders) FIFO often means your lowest-basis shares go first, which produces the largest possible gain.

The alternative is specific identification. You tell your broker exactly which lot to sell before or at the time of the trade, not afterward.6Internal Revenue Service. Stocks (Options, Splits, Traders) That lets you pick higher-cost lots to shrink the gain, or lots you’ve held over a year to qualify for long-term rates. Most online brokerages let you pick lots with a click on the sell screen.

Using Losses to Offset Gains

Losing sales have a tax use. When you sell stock at a loss, that loss first offsets your gains for the same year. Short-term losses go against short-term gains first, long-term losses against long-term gains, and anything left over crosses the line.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses

If total losses exceed total gains for the year, you can deduct up to $3,000 of the net loss against ordinary income like wages ($1,500 if married filing separately).8Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses Anything beyond that carries forward to future years indefinitely.9Office of the Law Revision Counsel. 26 USC 1212 – Capital Loss Carrybacks and Carryovers A $15,000 net loss would take five years to use up against ordinary income alone, though future gains could absorb it faster.

The Wash Sale Trap

There’s a catch on harvesting losses. If you sell a stock 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.10Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities The window runs in both directions, creating a 61-day blackout around the sale date.

The loss isn’t erased forever. It attaches to the cost basis of the replacement shares, which will reduce your gain (or grow your loss) whenever you eventually sell those.10Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities If you were counting on that loss to offset a gain this year, though, a wash sale wrecks the timing. The rule targets “substantially identical” securities, so investors who want to stay exposed to a sector sometimes buy a different company in the same industry during the window.

Stock You Inherited or Received as a Gift

Inherited stock and gifted stock look similar but follow completely different basis rules. Mixing them up is one of the more expensive mistakes at tax time.

Inherited

When you inherit stock, your basis resets to the fair market value on the date the original owner died.11Office of the Law Revision Counsel. 26 USC 1014 – Basis of Property Acquired From a Decedent That step-up can wipe out decades of appreciation for tax purposes. If your parent bought shares at $10 that were worth $100 the day they died, your basis is $100. Selling at $105 means tax on $5 per share, not $95.

Gifted

Stock given to you while the donor is alive works the opposite way. You generally take the donor’s original basis: whatever they paid.12Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust Same $10 shares gifted to you at $100 leaves your basis at $10. Selling at $105 means tax on $95 per share.

One wrinkle: if the market value at the time of the gift is below the donor’s basis, you use the lower fair market value as your basis for calculating losses, but the donor’s original basis for gains.12Office of the Law Revision Counsel. 26 USC 1015 – Basis of Property Acquired by Gifts and Transfers in Trust If the sale price lands between those two numbers, you have neither a gain nor a loss.

Accounts That Sidestep Capital Gains Tax

Certain retirement and savings accounts let you buy and sell stocks inside them without triggering capital gains tax on any individual trade. The treatment depends on the account:

  • Traditional 401(k) and Traditional IRA: gains grow tax-deferred. No capital gains tax on trades inside the account, but retirement withdrawals are taxed as ordinary income no matter whether the underlying profits were short- or long-term.
  • Roth IRA and Roth 401(k): gains grow tax-free. If you meet the age and holding requirements, qualified withdrawals are not taxed at all.
  • Health Savings Account: investment earnings inside the account are exempt, and withdrawals for qualified medical expenses are tax-free. After 65, you can withdraw for any reason and pay only ordinary income tax, similar to a Traditional IRA.13Office of the Law Revision Counsel. 26 USC 223 – Health Savings Accounts

The tradeoff is annual contribution limits and, usually, early-withdrawal penalties. A regular brokerage account gives you unlimited access but taxes every profitable sale in the year it happens.

Paying the Tax During the Year

Brokerages generally don’t withhold anything from stock sales. Employers withhold from paychecks; brokers don’t. If you sell for a large profit, the IRS expects you to send in a payment before your return is due, not to settle up the following April.

You need to make estimated tax payments if you expect to owe at least $1,000 in tax after withholding and refundable credits.14Internal Revenue Service. Estimated Tax for Individuals To avoid an underpayment penalty, pay the lesser of 90% of this year’s tax or 100% of last year’s tax. If your adjusted gross income last year was over $150,000, that second figure climbs to 110%.15Office of the Law Revision Counsel. 26 USC 6654 – Failure by Individual to Pay Estimated Income Tax Payments are due April 15, June 15, September 15, and January 15 of the following year.

State Tax Is on Top of All This

Everything above is federal. Most states also tax capital gains. A handful of states have no income tax, so stock gains escape state tax entirely. Most states that tax income treat capital gains as ordinary income, with rates that range roughly from about 1% to over 13% depending on the state and your income. A small number of states offer reduced rates or deductions specifically for long-term gains. Your combined federal and state rate on a stock sale could sit anywhere from 0% to well over 35%. Your state’s tax agency website will have the specific numbers.