Skip to content

General education, not advice for your situation.

Carry Forward Learning Search the site

Article · Your return, by the numbers

What is basis, and how does a wash sale change it?

Basis is the stack you subtract from the sale price. How gains are taxed in 2026, how losses net, and how a wash sale moves a loss onto new shares.

Editorial review: Carry Forward Learning (AI-assisted) Oct 25, 2026

Checked Review by

CheckedOct 24, 2026

The carry forward

Know your stack, and before a loss sale check every account, yours and your spouse's, on both sides of the window.

Basis is your tax cost, the stack you subtract from the sale price to find your gain or loss, and a wash sale doesn't erase a loss so much as move it onto the stack of the shares you bought back. 1 10

Bricks stack into an investment's basis beside its sale price, then a loss brick lifts off and lands on the stack of the shares bought backTwo panels. First: two bricks of purchases stack into the basis beside a taller sale-price bar, and the highlighted gap on top is the gain. Second: a shorter sale price leaves the top of the stack as a loss brick; a red-pen arrow lifts it onto the stack of the replacement shares, raising their basis. A dashed outline shows where it sat.Gain = price minus the stack.$4,700first buy$3,200second buybasis $7,900price $9,800gain$1,900A wash sale moves the loss brick.$7,900lossprice$6,600$6,800replacementshares$1,300newbasis$8,100bought back inside 30 daysBought in an IRA instead? The brick falls off the page.
Gain is the price minus the stack. A wash sale moves the loss brick; it doesn't smash it

1. Basis is the stack you subtract

The law measures a gain as what you received minus your adjusted basis, and a loss the other way round. 1 Basis starts as cost. 3 For shares, that's the purchase price plus costs of buying, such as commissions. 14 It's then adjusted over time: a nondividend distribution (a return of capital) lowers it, for instance. 2 14 Gifts and inheritances start the stack somewhere else, which the hub covers.

Hypothetical example, not law

Example: two bricks (hypothetical)

Rosa, a made-up investor, bought shares of one stock fund twice in 2024, for $4,700 and then $3,200. Her stack is $7,900. If she sells everything in 2026 for $9,800, her gain is $1,900. If she sells for $6,600, with each purchase selling for less than it cost, she has a $1,300 loss. Same shares, same stack; only the price moved.

2. How long you held it sets the rate, and losses net first

Held more than 12 months, a gain or loss is long-term; otherwise it's short-term. 4 Net short-term gain is taxed like wages. Net long-term gain is taxed at 0%, 15% or 20%, depending on where it sits on top of your other taxable income. 5 6

Where the 2026 long-term bands end (taxable income)
Filing statusTop of the lowest bandTop of the middle band
Single$49,450$545,500
Married filing jointly$98,900$613,700
Head of household$66,200$579,600

Collectibles gain is taxed at up to 28%, and unrecaptured section 1250 gain on real estate at up to 25%. 5 Higher earners can also owe the 3.8% net investment income tax, on the smaller of net investment income or the amount by which modified AGI exceeds $200,000 (single or head of household) or $250,000 (joint). 7

Before any rate applies, short-term results net with short-term, long-term with long-term, and then the two meet. 4 A net capital loss can offset up to $3,000 of other income a year, or half that if married filing separately. 8 The rest carries forward with no end date and keeps its short-term or long-term label. 9 14

Hypothetical example, not law

Example: harvesting the loss (hypothetical)

Rosa also has a $2,700 short-term gain from another sale in 2026. She sells the fund for $6,600, takes the $1,300 long-term loss, and stays out of that fund for the whole window. The two net: $2,700 minus $1,300 leaves $1,400 of net gain. None of it is net long-term gain, so all of it is taxed like wages.

3. A wash sale moves the loss onto the new stack

Sell stock or securities at a loss and, within 30 days before or after the sale, acquire substantially identical ones (by purchase, a fully taxable trade, or a contract or option), and the loss is disallowed. 10 11 A purchase for your IRA or Roth IRA counts. 13

The loss isn't gone. The replacement shares' basis becomes the old basis, adjusted by the difference between what you paid for them and what you sold the old shares for, which works out to their cost plus the disallowed loss. 10 14 Their holding period includes the time you held the old shares. 12 The exception is an IRA purchase: the IRA's basis doesn't go up, so the loss doesn't come back. 13

A timeline centred on a loss sale, with a shaded window on both sides catching buys in the same account, another account, an IRA or a spouse'sA timeline centred on a loss sale marked with a red-pen star. A highlighted window runs the same number of days before and after it. Four buy cards sit on the window: the same account, which the broker reports; another account, which you track; an IRA, where the loss is lost for good; and a spouse’s account, which the IRS says counts, marked unsettled.The window looks both ways30 days before30 days afterloss saleAnother accountyou track itSame account,same securitybroker reports itSpouse’s accountIRS says it countsunsettledIRA or Roth IRAloss lost for good
The window looks both ways, and it checks more than one account

Hypothetical example, not law

Example: buying back too soon (hypothetical)

Ten days after selling at $6,600, Rosa buys the same number of shares of the same fund for $6,800. That's a wash sale. The $1,300 loss is disallowed this year, so all $2,700 of her other gain is taxed. Her new stack is $6,800 plus $1,300, or $8,100, the same as the statute's route: $7,900 plus ($6,800 minus $6,600). The new shares count as held since her 2024 purchases. Had her IRA bought them instead, the $1,300 would be lost for good.

Common mistakes

  • Watching only the days after the sale. A purchase in the 30 days before a loss sale counts too. 11
  • Trusting the Form 1099-B to catch it. A broker must apply the rule only to identical securities in the same account. 15 16 The rest is yours to report on Form 8949 with code W, the disallowed loss as a positive number in column (g). 17
  • Buying in an IRA. A purchase you have your IRA make can make the loss disappear for good. 13 The ruling doesn't address automatic purchases, but our reading is that one you set up counts too.
  • Forgetting your spouse. The IRS says a purchase by your spouse, or by a corporation you control, is a wash sale too. 14

What is unsettled

  • Spouses. That rule rests on Publication 550; section 1091 speaks of what "the taxpayer" acquires, and we found no court decision on it. 10 14
  • Similar funds. "Substantially identical" turns on all the facts; there's no list for two funds tracking the same index. 14
  • Crypto. Section 1091 still covers "stock or securities" (text checked through Public Law 119-121). The IRS applies it to digital assets that are also stock or securities. 10 18 Bills to extend it to other digital assets weren't law as of October 24, 2026. Our reading is that a coin isn't covered, but no ruling or decision settles that.

What this does not cover

  • Gifted and inherited property, and their holding periods.
  • Options, short sales, straddles and traders' elections.
  • Qualified small business stock and state tax.
  • Whether harvesting a particular loss makes sense for you.

Carry it forward

Know your stack, and before a loss sale check every account, yours and your spouse's, on both sides of the window.

Where next

Questions

Does the wash-sale rule apply to gains?

No. It disallows losses only; a gain is taxed whether or not you buy back. 10

What if I buy back fewer shares than I sold?

Only the loss on the matching number of shares is disallowed. 11

Keep going

Words in this article

More on this path

Sources

  1. 26 U.S.C. section 1001(a) (gain or loss = amount realized minus adjusted basis) checked Oct 24, 2026
  2. 26 U.S.C. sections 1011(a) and 1016(a) (adjusted basis) checked Oct 24, 2026
  3. 26 U.S.C. section 1012(a) (basis is cost) checked Oct 24, 2026
  4. 26 U.S.C. section 1222, paragraphs (1)-(11) (short-term, long-term and netting terms) checked Oct 24, 2026
  5. 26 U.S.C. section 1(h) (capital gain rates) checked Oct 24, 2026
  6. IRS, Rev. Proc. 2025-32, section 4.03 (2026 capital gain rate breakpoints) (external site) checked Oct 24, 2026
  7. 26 U.S.C. section 1411(a)(1) and (b) (net investment income tax) checked Oct 24, 2026
  8. 26 U.S.C. section 1211(b) (limit on capital losses) checked Oct 24, 2026
  9. 26 U.S.C. section 1212(b)(1) (capital loss carryover) checked Oct 24, 2026
  10. 26 U.S.C. section 1091(a) and (d) (wash sales; basis of the replacement shares) checked Oct 24, 2026
  11. Treas. Reg. section 1.1091-1(a), (c), (d) and (f) (external site) checked Oct 24, 2026
  12. 26 U.S.C. section 1223(3) (holding period after a wash sale) checked Oct 24, 2026
  13. IRS, Rev. Rul. 2008-5 (IRA or Roth IRA purchase; holding) (external site) checked Oct 24, 2026
  14. IRS Publication 550 (2025), Wash Sales; Basis of Investment Property; Capital Losses (external site) checked Oct 24, 2026
  15. 26 U.S.C. section 6045(g)(2)(B)(ii) (broker basis and wash sales) checked Oct 24, 2026
  16. IRS, Instructions for Form 1099-B (2026), Box 1g, Wash Sale Loss Disallowed (external site) checked Oct 24, 2026
  17. IRS, Instructions for Form 8949 (2025), column (f) code W (external site) checked Oct 24, 2026
  18. IRS, Instructions for Schedule D (Form 1040) (2025), Wash Sales (external site) checked Oct 24, 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: long term holding more than months
    IRC 1222(3) checked 2026-10-19, review by 2027-01-19
  • Equity comp: wash sale window days
    IRC 1091(a) checked 2026-10-19, review by 2027-01-19
  • Capital gains: fifteen rate maximum 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
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: fifteen rate maximum taxable income, single
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • 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
    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
    Rev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
  • Capital gains: zero rate maximum 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
    26 U.S.C. sec. 1211(b) checked 2026-09-24, review by 2027-01-22
  • Payroll and SE tax: niit rate
    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
    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
    IRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b)(3) checked 2026-10-12, review by 2027-02-09