Skip to content

General education, not advice for your situation.

Carry Forward Learning Start here Intern0 XP

Article · Your return, by the numbers

Capital gains, tax-loss harvesting and the wash-sale rule

How long-term and short-term gains are taxed in 2026, how losses offset gains and income, and how the wash-sale rule can quietly postpone a loss.

By the Carry Forward Learning team Reviewed by Hunter Nottingham, JD, CPA

Checked Review by

CheckedOct 19, 2026

The carry forward

Losses net first, the rest waits in line, and the wash-sale window runs both ways.

When you sell an investment, the tax depends on three things: how long you held it, what else you sold that year, and whether you bought it back too soon. This article walks through each one in order, with the 2026 thresholds, how losses net against gains, and the wash-sale rule that trips up careful people every December.

Short term or long term: the holding period

The first question is the calendar. If you held the asset more than one year before selling, the gain or loss is long-term; one year or less, and it is short-term. 1 Inherited and gifted property have their own holding-period rules, which the IRS notes as exceptions. 1

The difference matters because the two are taxed differently. Net short-term gains are taxed as ordinary income, at the same graduated rates as wages. 1 Net long-term gains get their own, lower rate schedule.

The 2026 long-term rates

Most net long-term gain is taxed at 0%, 15% or 20%, depending on your taxable income and filing status. 1 The breakpoints are measured on taxable income, after deductions, not on the gain alone:

Filing status (2026)0% rate up to15% rate up to
Single$49,450$545,500
Married filing jointly$98,900$613,700
Head of household$66,200$579,600

Above the second column, the 20% rate applies. We find it helps to picture the gain stacked on top of your other taxable income: the part of the stack that sits below a breakpoint gets the lower rate, and only the part above it moves up.

Two categories sit outside that schedule. Gain on collectibles, such as coins or art, is taxed at up to 28%, and unrecaptured section 1250 gain on real property at up to 25%. 1

The surtax on top

Higher earners can also owe the net investment income tax of 3.8%. It applies to the smaller of your net investment income or the amount by which modified AGI exceeds the threshold: $200,000 for single or head of household, $250,000 for married filing jointly. Gains on stocks, bonds and mutual funds count as net investment income. 6

Netting: gains and losses meet first

You do not pay tax on each sale by itself. Short-term gains and losses net against each other, long-term gains and losses net against each other, and then the two results are combined. 1 That is why a loss on one position can cancel a gain on another in the same year.

If the losses are larger, the net capital loss can offset ordinary income, such as wages, up to $3,000 a year, or half that if you are married filing separately. 3 Anything over the limit is not lost. It carries over to the next year and later years until it is used up, and it keeps its character as short-term or long-term. 2

Tax-loss harvesting, in plain terms

Tax-loss harvesting is just using that netting on purpose. Before the year ends, you sell a holding that is worth less than you paid, so the loss offsets gains you already have, or up to the yearly limit of ordinary income. Most people then want to stay invested, so they buy something back. That second step is where the wash-sale rule comes in.

The wash-sale rule

A wash sale happens when you sell stock or securities at a loss and, in the 30 days before or the 30 days after the sale, you buy substantially identical stock or securities. 2 The window runs in both directions, so a purchase made in the month before the sale counts too. 4

Publication 550 lists four ways to trigger it: buying substantially identical stock or securities, acquiring them in a fully taxable trade, acquiring a contract or option to buy them, or acquiring them for your IRA or Roth IRA. 2 It also applies if your spouse, or a corporation you control, buys substantially identical stock. 2 Shares received as a stock bonus at work can count as a purchase too. 2

What happens to the loss. In the ordinary case it is postponed, not erased. You add the disallowed loss to the cost of the new shares, which raises their basis, and your holding period for the new shares includes the time you held the old ones. 2 You get the loss back later, when you sell the new shares outside the window.

The IRA exception to that. When the replacement is bought inside your IRA or Roth IRA, Publication 550 does not add the disallowed loss to the basis of the new shares. 2 An IRA has no basis to adjust in the same way, so in practice the loss does not come back later.

What "substantially identical" means. There is no bright-line list. The IRS says you must consider all the facts and circumstances, and that stock of one corporation is ordinarily not substantially identical to stock of another, with exceptions such as a reorganization. 2 For funds that track similar indexes, there is no IRS list to check against; the facts-and-circumstances test is all there is.

Worked example (hypothetical)

Hypothetical example, not law and not a client

Example, hypothetical round numbers, not a real person. Single filer, tax year 2026, all positions held in a regular taxable brokerage account.

In November she sells a stock fund she bought for $40,000. It is now worth $31,000, so she has a $9,000 long-term loss. Earlier in the year she sold another stock at a $1,800 short-term gain.

Version one: she waits. She keeps the cash out of that fund for more than the 30-day window and buys back in after it. Netting: the $9,000 loss wipes out the $1,800 gain, leaving a $7,200 net loss. She deducts $3,000 of it against her wages this year, and the rest carries over to next year as a long-term loss.

Version two: she buys back too soon. Ten days after the sale she buys the same fund again for $31,000. That is a wash sale. The $9,000 loss is disallowed this year, so her $1,800 gain is fully taxable and nothing offsets her wages. Her basis in the new shares becomes $40,000, the $31,000 she paid plus the $9,000 disallowed loss, and her holding period starts from her original purchase. The loss is waiting for her when she eventually sells.

Version three: the IRA purchase. Same sale, but the repurchase happens inside her IRA. The loss is disallowed, and because the replacement sits in the IRA, it is not added to any basis. That one does not come back.

Reporting: Form 8949 and Schedule D

Most sales go on Form 8949, and the totals flow to Schedule D. 1 Your broker's Form 1099-B generally shows any wash-sale loss it disallowed, and the Schedule D instructions tell you to report a wash sale on Form 8949 with code W. 5 A broker is required to report a wash sale only when the sale and the purchase happen in the same account and involve the same security, so purchases in a different account, an IRA or a spouse's account are yours to watch. 7

What this does not cover

  • Gifted and inherited property, and their basis rules.
  • Qualified small business stock, section 1250 recapture in detail and collectibles beyond the rate.
  • Options strategies, short sales, straddles and traders' mark-to-market elections.
  • Crypto and digital assets, and how the wash-sale rule applies to them.
  • State income tax on capital gains.
  • Whether harvesting a particular loss makes sense for you.

Carry it forward

Losses net first, the rest waits in line, and the wash-sale window runs both ways.

For the forms that report these sales, see the January tax forms. If your sales come from stock pay at work, start with RSU withholding and ESPP. For timing moves before December 31, see the year-end checklist.

Questions

How long do I have to hold a stock for long-term capital gains?

More than one year. 1 One year or less is short-term and taxed as ordinary income. 1

How much capital loss can I deduct in a year?

Losses first offset gains without limit. Beyond that, up to $3,000 against other income, or half that if married filing separately, and the rest carries forward.

Does the wash-sale rule apply if I buy back in my IRA?

Yes. Publication 550 lists a purchase for your IRA or Roth IRA as a wash sale, and in that case the loss is not added to the new shares' basis.

Does the wash-sale rule apply to gains?

No. It disallows losses. A gain is taxable whether or not you buy back.

Is a wash-sale loss gone forever?

Usually not. It is added to the basis of the replacement shares and comes back when you sell them, except when the replacement was bought in an IRA.

Keep going

Words in this article

More on this path

Sources

  1. IRS Topic no. 409, Capital gains and losses (external site) checked Oct 19, 2026
  2. IRS Publication 550, Investment Income and Expenses (Wash Sales; Capital Losses) (external site) checked Oct 19, 2026
  3. 26 U.S.C. section 1211 (limitation on capital losses) checked Oct 19, 2026
  4. 26 U.S.C. section 1091 (loss from wash sales of stock or securities) checked Oct 19, 2026
  5. Instructions for Schedule D (Form 1040) (external site) checked Oct 19, 2026
  6. IRS Topic no. 559, Net investment income tax (external site) checked Oct 19, 2026
  7. IRS, Instructions for Form 1099-B (box 1g, wash sale loss disallowed) (external site) checked Oct 19, 2026

Figures on this page

Checked

Every figure above comes from the source listed here, with the date we checked it and the date it is due for a re-check.

  • Capital gains: fifteen rate maximum taxable income, head of household federal-2026:capital_gains.fifteen_rate_max_taxable_income.head_of_household
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: fifteen rate maximum taxable income, married filing jointly and surviving spouse federal-2026:capital_gains.fifteen_rate_max_taxable_income.married_filing_jointly_and_surviving_spouse
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: fifteen rate maximum taxable income, single federal-2026:capital_gains.fifteen_rate_max_taxable_income.single
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: rates federal-2026:capital_gains.rates
    26 U.S.C. sec. 1(h) checked 2026-09-24, review by 2027-01-22
  • Capital gains: zero rate maximum taxable income, head of household federal-2026:capital_gains.zero_rate_max_taxable_income.head_of_household
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: zero rate maximum taxable income, married filing jointly and surviving spouse federal-2026:capital_gains.zero_rate_max_taxable_income.married_filing_jointly_and_surviving_spouse
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: zero rate maximum taxable income, single federal-2026:capital_gains.zero_rate_max_taxable_income.single
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Itemized deductions: capital loss limit vs ordinary income federal-2026:itemized_deductions.capital_loss_limit_vs_ordinary_income
    26 U.S.C. sec. 1211(b) checked 2026-09-24, review by 2027-01-22
  • Payroll and SE tax: niit rate federal-2026:payroll_and_se_tax.niit_rate_pct
    26 U.S.C. sec. 1411(a)(1) checked 2026-09-24, review by 2027-01-22
  • Payroll and SE tax: niit threshold MAGI, married filing jointly and surviving spouse federal-2026:payroll_and_se_tax.niit_threshold_magi.married_filing_jointly_and_surviving_spouse
    IRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b) checked 2026-10-12, review by 2027-02-09
  • Payroll and SE tax: niit threshold MAGI, single and head of household federal-2026:payroll_and_se_tax.niit_threshold_magi.single_and_head_of_household
    IRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b)(3) checked 2026-10-12, review by 2027-02-09