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, 2026The 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
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
| Filing status | Top of the lowest band | Top 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
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
- The full answer to "What happens to a loss that's disallowed?", plus partial buybacks, crypto and Form 8949: the capital gains and wash-sale hub.
- Why the purchase records behind your stack outlive the year you bought: how long to keep tax records.
- Words on this page: basis, wash sale, holding period, capital gain, capital loss, Form 1099-B.
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
- Wash sale
- Taxable income
- Filing status
- Head of household
- NIIT (net investment income tax)
- Adjusted gross income (AGI)
- Capital loss
- Roth IRA
- Holding period
- Form 1099-B
Sources
- 26 U.S.C. section 1001(a) (gain or loss = amount realized minus adjusted basis) checked Oct 24, 2026
- 26 U.S.C. sections 1011(a) and 1016(a) (adjusted basis) checked Oct 24, 2026
- 26 U.S.C. section 1012(a) (basis is cost) checked Oct 24, 2026
- 26 U.S.C. section 1222, paragraphs (1)-(11) (short-term, long-term and netting terms) checked Oct 24, 2026
- 26 U.S.C. section 1(h) (capital gain rates) checked Oct 24, 2026
- IRS, Rev. Proc. 2025-32, section 4.03 (2026 capital gain rate breakpoints) (external site) checked Oct 24, 2026
- 26 U.S.C. section 1411(a)(1) and (b) (net investment income tax) checked Oct 24, 2026
- 26 U.S.C. section 1211(b) (limit on capital losses) checked Oct 24, 2026
- 26 U.S.C. section 1212(b)(1) (capital loss carryover) checked Oct 24, 2026
- 26 U.S.C. section 1091(a) and (d) (wash sales; basis of the replacement shares) checked Oct 24, 2026
- Treas. Reg. section 1.1091-1(a), (c), (d) and (f) (external site) checked Oct 24, 2026
- 26 U.S.C. section 1223(3) (holding period after a wash sale) checked Oct 24, 2026
- IRS, Rev. Rul. 2008-5 (IRA or Roth IRA purchase; holding) (external site) checked Oct 24, 2026
- IRS Publication 550 (2025), Wash Sales; Basis of Investment Property; Capital Losses (external site) checked Oct 24, 2026
- 26 U.S.C. section 6045(g)(2)(B)(ii) (broker basis and wash sales) checked Oct 24, 2026
- IRS, Instructions for Form 1099-B (2026), Box 1g, Wash Sale Loss Disallowed (external site) checked Oct 24, 2026
- IRS, Instructions for Form 8949 (2025), column (f) code W (external site) checked Oct 24, 2026
- IRS, Instructions for Schedule D (Form 1040) (2025), Wash Sales (external site) checked Oct 24, 2026
Figures on this page
CheckedEvery 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 monthsIRC 1222(3) checked 2026-10-19, review by 2027-01-19
cf-2026:capital_gains.long_term_holding_more_than_months - Equity comp: wash sale window daysIRC 1091(a) checked 2026-10-19, review by 2027-01-19
cf-2026:equity_comp.wash_sale_window_days - Capital gains: fifteen rate maximum taxable income, head of householdRev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.fifteen_rate_max_taxable_income.head_of_household - Capital gains: fifteen rate maximum taxable income, married filing jointly and surviving spouseRev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.fifteen_rate_max_taxable_income.married_filing_jointly_and_surviving_spouse - Capital gains: fifteen rate maximum taxable income, singleRev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.fifteen_rate_max_taxable_income.single - Capital gains: rates26 U.S.C. sec. 1(h) checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.rates - Capital gains: zero rate maximum taxable income, head of householdRev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.zero_rate_max_taxable_income.head_of_household - Capital gains: zero rate maximum taxable income, married filing jointly and surviving spouseRev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.zero_rate_max_taxable_income.married_filing_jointly_and_surviving_spouse - Capital gains: zero rate maximum taxable income, singleRev. Proc. 2025-32 sec. 4.03 checked 2026-09-24, review by 2027-01-22
federal-2026:capital_gains.zero_rate_max_taxable_income.single - Itemized deductions: capital loss limit vs ordinary income26 U.S.C. sec. 1211(b) checked 2026-09-24, review by 2027-01-22
federal-2026:itemized_deductions.capital_loss_limit_vs_ordinary_income - Payroll and SE tax: niit rate26 U.S.C. sec. 1411(a)(1) checked 2026-09-24, review by 2027-01-22
federal-2026:payroll_and_se_tax.niit_rate_pct - Payroll and SE tax: niit threshold MAGI, married filing jointly and surviving spouseIRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b) checked 2026-10-12, review by 2027-02-09
federal-2026:payroll_and_se_tax.niit_threshold_magi.married_filing_jointly_and_surviving_spouse - Payroll and SE tax: niit threshold MAGI, single and head of householdIRS Net Investment Income Tax page; 26 U.S.C. sec. 1411(b)(3) checked 2026-10-12, review by 2027-02-09
federal-2026:payroll_and_se_tax.niit_threshold_magi.single_and_head_of_household