Skip to content

General education, not advice for your situation.

Carry Forward Learning Search the site

Capital Gains and the Wash-Sale Rule

Capital gains and wash sales: common questions from real

Same facts. Pro adds the full authority stack under each answer.

I sold a fund at a loss in December and my automatic investment bought it again two weeks later. Is that a problem?

It can be. A purchase within 30 days of a loss sale is the textbook wash sale, and a scheduled investment counts as a purchase just like any other. The part of the loss that matches the shares bought is disallowed for now and added to the basis of those shares. If the purchase was in the same account, your Form 1099-B may already show it in box 1g.
Sources

Authority, strongest first

  1. Code I.R.C. § 1091
  2. Publication IRS Publication 550 (2025)
  3. Form instructions Instructions for Form 1099-B (2026)
The rule matches shares in order of acquisition (Reg. 1.1091-1(c)); the holding period carries over (1223(3)). If the automatic purchase was in a different account (an IRA, a spouse's account), the broker may not have caught it and you add the adjustment yourself on Form 8949 with code W.

I sold shares at a loss, and my retirement account bought the same fund a week later.

That's a wash sale, and a costly one. The loss is disallowed, and since the replacement shares are inside an IRA or Roth IRA, the disallowed loss doesn't add to any basis. It simply isn't deductible anywhere. Your broker will probably not report it, so it's yours to catch.
Sources

Authority, strongest first

  1. Revenue ruling Rev. Rul. 2008-5, 2008-3 I.R.B. 271
  2. Publication IRS Publication 550 (2025)
Rev. Rul. 2008-5: loss disallowed, IRA basis not increased. Pub. 550 treats an acquisition for your IRA or Roth IRA as a wash sale and excludes it from the add-to-basis rule. If you already filed a return deducting the loss, an amended return may be needed; we don't cover that process here.

My Form 1099-B shows nothing for the cost basis. What do I put?

Your real basis. Look for your purchase confirmations, old statements or the broker's help desk. If the shares were bought before basis reporting began or came in from another firm, the form often shows no basis, and the form is allowed to. Enter your own figure on Form 8949 in column (e), with the box for 'basis not reported to the IRS'. If you truly can't find it, ask the broker for the records they have, as the Form 8949 instructions suggest.
Sources

Authority, strongest first

  1. Code I.R.C. § 6045
  2. Form instructions Instructions for Form 8949 (2025)
  3. Form instructions Instructions for Form 1099-B (2026)
Form 8949 (2025): if you lost or didn't keep records to determine basis in securities, contact your broker; the broker may have reported basis in box 1e of Form 1099-B or box 1g of Form 1099-DA. Where basis was not reported to the IRS, use box B, E (H, K for digital assets).

My mother left me shares she bought in the 1980s. What's my basis?

Generally the value on the day she died, not what she paid. The estate may have used the alternate valuation date instead. If the estate had to file an estate tax return, you may have received a Schedule A (Form 8971) with the value to use. Sell them within a year of her death or later, and the gain is long-term either way.
Sources

Authority, strongest first

  1. Code I.R.C. § 1014
  2. Code I.R.C. § 1223
  3. Publication IRS Publication 551 (Rev. December 2025)
1014(a)(1)-(2); 1223(9) deems the holding period more than a year when sold within a year of death; Form 8949 asks for 'INHERITED' in column (b). Where the estate did not file an estate tax return, Pub. 551 says the appraised value for state inheritance or transmission tax purposes can be used.

My grandfather gave me shares worth less than he paid. I want to sell them.

You may have two bases. For a gain, you use his basis; for a loss, you use the lower value on the day he gave them to you. If you sell for a price in between, there's no gain and no loss. That's the rule's way of keeping a donor's loss from moving to you. Ask him for his purchase records and the date of the gift.
Sources

Authority, strongest first

  1. Code I.R.C. § 1015
  2. Code I.R.C. § 1223
  3. Publication IRS Publication 551 (Rev. December 2025)
1015(a); Pub. 551 (FMV Less Than Donor's Adjusted Basis). Holding period: tacked for gain; starts the day after the gift for loss (Pub. 550).

I paid for a laptop with crypto. Is that a taxable sale?

Yes. Paying with crypto is a disposition: you're treated as selling the coins for the laptop's value. You have a gain if the coins were worth more than your basis in them, or a loss if less. If you held the coins as an investment, it's a capital gain or loss, short-term or long-term depending on how long you held them.
Sources

Authority, strongest first

  1. Notice Notice 2014-21, 2014-16 I.R.B. 938
  2. Publication IRS Publication 550 (2025)
Notice 2014-21 Q&A 6 (exchange of virtual currency for other property produces gain or loss) and Q&A 7 (character); Pub. 550 lists 'an exchange of digital assets for property, goods, or services' among digital asset transactions. If you held the coins for personal use rather than as an investment, a loss may not be deductible (165(c)); that depends on your facts and we don't cover it.

I lost a lot in the market this year. Can I deduct all of it?

Not all at once. Your losses first offset your capital gains. If there's still a loss, you can deduct up to $3,000 against other income this year (half that if married filing separately). The rest carries forward to later years, with no end date, until you use it up.
Sources

Authority, strongest first

  1. Code I.R.C. § 1211
  2. Code I.R.C. § 1212
  3. Publication IRS Publication 550 (2025)
1211(b) and 1212(b); Schedule D line 21 and the Capital Loss Carryover Worksheet.

We're separating, and we have a capital loss carryover from our joint returns. Whose is it?

Per Pub. 550, a carryover from a joint return can be deducted only on the return of the spouse who actually had the loss. If the losses were in a joint account, you may need to work out each person's share; the facts of who owned what matter. Keep the old joint Schedule D and the brokerage statements.
Sources

Authority, strongest first

  1. Publication IRS Publication 550 (2025)
  2. Form instructions Instructions for Schedule D (Form 1040) (2025)
Capital Loss Carryover Worksheet instructions in Pub. 550 and the Schedule D instructions. How losses in a jointly owned account are divided is not addressed in the sources we read.

It's December and I want to sell my losers before year-end. What should I watch?

Four things, in this order. First, the trade date: it has to be by December 31 to count for this year. Second, the wash sale window: a purchase of the same thing within 30 days on either side, in any of your accounts (including your IRA or your spouse's), can disallow the loss. Third, the limit: losses beyond your gains are capped at $3,000 a year against other income. Fourth, basis: confirm it before you sell. That's the rules, not a recommendation for anyone's situation.
Sources

Authority, strongest first

  1. Code I.R.C. § 1091
  2. Code I.R.C. § 1211
  3. Revenue ruling Rev. Rul. 2008-5, 2008-3 I.R.B. 271
  4. Publication IRS Publication 550 (2025)
Pub. 550 (trade date, wash sales); 1211(b); 1091(a). The December 31 deadline is the last trade date of the year for a calendar-year taxpayer.

My fund reinvests dividends every quarter. Do I really have to track each purchase?

Your broker usually does, and for covered shares it's on your Form 1099-B. Each reinvestment is a new purchase with its own date and basis, so it gets its own holding period. If you choose average basis for a mutual fund, the broker may track one average. Check the statement before you rely on it, especially if you transferred the account from another firm.
Sources

Authority, strongest first

  1. Code I.R.C. § 1012
  2. Publication IRS Publication 550 (2025)
  3. Publication IRS Publication 551 (Rev. December 2025)
Pub. 550: original cost basis of mutual fund shares bought by reinvesting distributions is the amount used for each share; reinvested shares' holding period begins the day after purchase. 1012(d) has an average-basis rule for DRIP stock acquired after 2011. Pub. 551 describes the average basis choice for mutual fund shares.

My employer's stock plan delivered shares and the 1099-B basis looks wrong.

That's common for stock from pay. The income you were taxed on at the vest or purchase should be in your basis, and a broker often doesn't add it. If the form shows a low basis, correct it on Form 8949 with code B so you aren't taxed twice. The hubs on stock pay and on ESPPs and ISOs walk through it.
Sources

Authority, strongest first

  1. Code I.R.C. § 1012
  2. Form instructions Instructions for Form 8949 (2025)
  3. Form instructions Instructions for Form 1099-B (2026)
Form 8949 code B corrects a wrong basis on Form 1099-B or Form 1099-DA; where basis was reported to the IRS, keep the broker's basis in column (e) and put the correction in column (g).

More questions

Where the numbers come from

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.

  • Equity comp: wash sale window days
    IRC 1091(a) checked 2026-10-19, review by 2027-01-19
  • Itemized deductions: capital loss limit vs ordinary income
    26 U.S.C. sec. 1211(b) checked 2026-09-24, review by 2027-01-22