Does buying in my 401(k) trigger a wash sale?

By Wash-Sale Guardian (who's behind it) · Published 2026-11-01 · Last updated 2026-11-01 · How the checker works

Get the year-end reminders by email ↓

There is no IRS ruling on this that we could find, so we can't give you a settled yes or no. Rev. Rul. 2008-5 decides the case of your own IRA or Roth IRA, and it says it "does not address any issues other than those specifically addressed herein." Whether a 401(k) purchase washes a loss in your taxable account depends on what the plan bought and how the purchase came about, so it's a question for a CPA or EA.

What the primary sources say

  • The statute. IRC §1091(a) disallows the loss when "the taxpayer has acquired" substantially identical stock or securities from 30 days before the sale through 30 days after. It doesn't mention accounts, IRAs or retirement plans, and neither does Treas. Reg. §1.1091-1.
  • Pub 550's list. IRS Publication 550 names an IRA purchase: "Acquire substantially identical stock for your individual retirement arrangement (IRA) or Roth IRA." Its wash-sale section doesn't name a 401(k).
  • Pub 550's introduction. "The rules in this publication do not apply to investments held in individual retirement arrangements (IRAs), section 401(k) plans, and other qualified retirement plans." That sentence doesn't answer the question either way. It names IRAs too, and the same publication lists an IRA purchase as a wash sale.

What Rev. Rul. 2008-5 decided

A person sells stock at a loss and the next day "causes an individual retirement account (within the meaning of § 408) or a Roth IRA (within the meaning of § 408A), established for the exclusive benefit of A or A's beneficiaries, to purchase" the same stock. The holding: "The loss on the Sale of stock is disallowed under § 1091. A's basis in the individual retirement account or Roth IRA is not increased by virtue of § 1091(d)."

The reasoning draws on a 1933 case about a trust, where "actual command over the property was still in the [taxpayer]". The ruling concludes that "even though an individual retirement account is a tax-exempt trust, A has nevertheless acquired" the shares. It doesn't mention a 401(k). The IRA guide covers what it means for an IRA.

Why this page can't settle it

The sources leave room for argument on each side. These are our readings, and no IRS statement makes them:

  • A reason for caution. Some commentators extend the ruling's reasoning to accounts you direct. The IRS describes a 401(k) as letting employees "contribute a portion of their wages to individual accounts", and a plan can let participants choose the funds (a Labor Department rule covers such plans, solely for ERISA purposes).
  • A reason the ruling may not reach it. A 401(k) trust is part of a plan "of an employer for the exclusive benefit of his employees or their beneficiaries" (IRC §401(a)), which isn't the account in the ruling's facts.
  • A second open question. If a plan purchase did count, what happens to the disallowed loss? Pub 550 adds it to the new shares' cost "except in (4) above", which is the IRA item. Nothing we read says whether a 401(k) falls inside that exception.

It depends on what the plan bought

  • The same fund you sold (same ticker or CUSIP). The security question has little room in it, so what's left is whether the plan's purchase counts as yours. In our reading, this is the fund case closest to the ruling's facts, and it's still undecided.
  • A different vehicle on the same index. A plan's fund may be another share class or "a collective trust fund maintained by a bank" (15 U.S.C. §77c(a)(2) names them for qualified plans). Pub 550's wash-sale section doesn't mention funds: "you must consider all the facts and circumstances in your particular case." No primary source settles it. This adds a question to the one above: is it substantially identical at all?
  • A fund on a meaningfully different index. Investors commonly use this pattern, and we found no primary source on it. It isn't an exemption. Pub 550 says only to consider "all the facts and circumstances", and nothing we read says which facts count for a fund, so ask a CPA or EA.
  • A company-stock fund. If you sold your employer's stock at a loss and the plan bought it, Pub 550's line about another corporation doesn't help, because it's the same corporation. See whether your statement shows shares or units of a fund. We found no primary source on either in a plan. A vest or an ESPP purchase outside the plan has its own guide.
  • A broad fund that holds the stock you sold. Pub 550: "Ordinarily, stocks or securities of one corporation are not considered substantially identical to stocks or securities of another corporation." It adds "they may be substantially identical in some cases" and doesn't mention funds. We found nothing that treats a fund's own purchases as yours, and nothing that addresses this case directly.

A worked example

Made-up trades in a made-up fund. Assume the plan offers the very same fund:

  • March 2, 2026: you buy 100 shares of TIDEWELL at $50 in your taxable account, for $5,000.
  • Monday, November 9, 2026: you sell all 100 at $40, for $4,000. That's a $1,000 loss, or $10 a share.
  • Every other Friday: your 401(k) buys 10 shares at $40, for $400, on October 16, October 30, November 13, November 27 and December 11.

The window for a November 9 sale runs from October 10 through December 9, both days included. Four of the five paydays are inside it, so 40 shares are in question. Two of them came before the sale, and nothing you do after the sale changes those. December 11 is outside this window.

The dollars at stake, depending on what a CPA or EA concludes for your facts:

  • If the plan's purchases don't count: they wash none of the $1,000 loss.
  • If they do count: 40 shares × $10 = $400 is disallowed and $600 isn't washed by them. On Form 8949 the sale would show code W and $400 in column (g) (how code W works).
  • Where that $400 would go: no primary source we read says whether it would be added to a basis or be gone.

The sale and the plan's purchases aren't in one account, so your broker isn't required to report this. Check what your 1099-B shows. Pub 550 says "you cannot deduct a loss from a wash sale even if it is not reported on Form 1099-B", so an empty box 1g doesn't answer the question.

What to bring to a CPA or EA

  • The loss sale: date, shares, amount, account, and the 1099-B row with its box 1g.
  • Every plan purchase from 30 days before the sale through 30 days after: trade dates and amounts for contributions, any employer match, rebalancing and reinvested dividends. The plan's transaction history may show them.
  • What the plan bought: the fund's name, any ticker or CUSIP, its fact sheet and index, and whether your statement shows shares or units.
  • How it was chosen: your own election, a default, or an adviser, and whether the purchase went through a self-directed brokerage option.
  • The questions: Is the plan's purchase treated as mine? Is the fund substantially identical to what I sold? If so, what happens to the disallowed amount?

Before a sale, some investors look at what the plan bought in the prior 30 days, then direct new contributions to another fund through 30 days after, or harvest a holding the plan doesn't buy. That reduces the overlap, and it doesn't settle the question.

What the free checker does with a 401(k)

The free checker reads CSV exports from the brokers it supports and other files you map, in your browser, with nothing uploaded and no broker login. It doesn't decide this question. It reads the trades in the files you import, so a 401(k) purchase, a vest or a payroll ESPP buy that isn't in a file isn't seen. With only the taxable file from the example, it shows no wash sale, and that says nothing about the plan.

  • It has no 401(k) account type. Each imported account is taxable or IRA. Tagged IRA, the example's plan purchases show four $100 wash sales, $400 in all, each with the red "PERMANENT" label. Tagged taxable, they show the same four $100 wash sales, and the added basis reaches a year-end row only once those shares are sold. Neither is a finding about a 401(k).
  • You can list the plan without importing it. Under "Accounts I haven't added", with type "Not sure", its trades can't be checked and "Can I buy it?" says "Can't tell" until you import it or remove it.
  • It compares the same ticker and options on it only. A plan fund under another name or symbol, a collective trust, or units of a stock fund won't match what you sold.
  • It doesn't model Section 475, and its methodology lists the rest of its limits.

Frequently asked questions

Does my 401(k) buying the same fund wash a loss in my taxable account?

We found no IRS ruling that answers it, so we can’t give you a settled yes or no. The law says "the taxpayer has acquired", and Pub 550’s wash-sale list and Rev. Rul. 2008-5 name only an IRA or Roth IRA. Take the sale and the plan’s purchase dates to a CPA or EA.

Does Rev. Rul. 2008-5 apply to a 401(k)?

It doesn’t say so. Its facts are an IRA or Roth IRA "established for the exclusive benefit of A or A’s beneficiaries", and it says it "does not address any issues other than those specifically addressed herein." Applying its reasoning to a 401(k) is an inference, and we found no primary source that decides whether the inference holds.

Is a collective trust in my plan substantially identical to the retail fund or ETF on the same index?

No primary source we read settles it. Pub 550’s wash-sale section doesn’t mention funds. It says "you must consider all the facts and circumstances in your particular case." Ask a CPA or EA, with the fact sheets for both.

Does my 401(k) index fund buying a stock I sold at a loss wash that loss?

We found nothing that treats a fund’s own purchases as yours, and nothing that addresses this case directly. Pub 550 says "Ordinarily, stocks or securities of one corporation are not considered substantially identical to stocks or securities of another corporation", and it adds that they may be in some cases. Ask a CPA or EA if your facts are unusual.

What about company stock in my 401(k)?

That line about another corporation doesn’t help when you sold your employer’s stock and the plan bought it. We found no primary source on a plan’s company-stock fund, including one credited in units. Ask a CPA or EA, and bring statements that show what the plan bought and when.

Is a Roth 401(k), a 403(b) or a 457 plan any different?

They have the same gap. Rev. Rul. 2008-5 covers an IRA under § 408 and a Roth IRA under § 408A, and Pub 550’s wash-sale list names only an IRA or Roth IRA. Neither speaks to these plans, so ask a CPA or EA.

What if I sell at a loss inside my 401(k) and buy it back there?

That is a different question from this page’s. Pub 550 says "The rules in this publication do not apply to investments held in individual retirement arrangements (IRAs), section 401(k) plans, and other qualified retirement plans." This page is about a loss in a taxable account.

Will my 1099-B show it?

Your broker isn’t required to show it. The Form 1099-B instructions require reporting only "if both the sale and purchase transactions occur in the same account with respect to covered securities with the same CUSIP number", though a broker may report more. Check what your 1099-B shows, and don’t read an empty box 1g as an answer to the 401(k) question.

Informational, not tax advice. Primary sources: IRS Publication 550, IRC §1091, Rev. Rul. 2008-5 — linked inline above. Found an error? Tell us and we'll fix it.

Get the year-end wash-sale reminders

Short emails at the moments that matter: before Nov 30 (the last day to sell at a loss and still re-buy within 2026); before Dec 31; and when 1099-Bs arrive in February. The one-page year-end checklist PDF comes with it.

Sign up and a link to the PDF appears right here. Confirm the email we send and you're on the list: about four to six emails a year, and you can unsubscribe in one click from any of them. Your trades stay in your browser. The form sends our email service only your email address and the page you signed up from — nothing else (see Privacy).