---
title: Wash sale — what it means and why it matters | Allocate AI
description: Selling an investment at a loss and buying the same or a nearly identical one within 30 days before or after, which disallows the loss for tax purposes.
canonical: https://allocateai.io/glossary/wash-sale
site: Allocate AI — https://allocateai.io
---

# Wash sale

Selling an investment at a loss and buying the same or a nearly identical one within 30 days before or after, which disallows the loss for tax purposes.

A wash sale happens when you sell an investment at a loss and buy substantially identical shares within a 61-day window: 30 days before the sale, the day of, and 30 days after. When that happens, the IRS disallows the loss for now. It is not gone; it gets added to the cost basis of the new shares and can be claimed when those are eventually sold. But you cannot use it this year.

Example: you sell 100 shares of a fund at a $4,000 loss on March 1 and buy 100 shares of the same fund on March 20. The $4,000 loss is disallowed. Your new shares carry a basis $4,000 higher than what you paid for them.

The rule catches people in ways they do not expect. Buying the same stock in an IRA counts. A spouse buying it counts. Dividend reinvestment that buys a few shares automatically counts. And for people with equity compensation, an RSU vest or ESPP purchase of company stock within 30 days of selling company stock at a loss counts too, which can quietly undo tax-loss harvesting on a concentrated position.

The common mistake is harvesting a loss in December and letting a scheduled vest or purchase land in January. Before selling company stock at a loss, check the next vest date. If it is inside the window, either wait or accept that the loss will be deferred rather than used now.

## Related terms

- [Tax-loss harvesting](https://allocateai.io/glossary/tax-loss-harvesting) — Selling investments that have dropped in value to lock in a loss that offsets taxable gains or income, then buying something similar to stay invested.
- [Capital gains (short-term vs long-term)](https://allocateai.io/glossary/capital-gains) — Profit from selling an investment for more than you paid; gains on assets held over a year get lower tax rates than gains on assets sold sooner.
- [Cost basis](https://allocateai.io/glossary/cost-basis) — What you paid for an investment, including fees, or the value you were taxed on when you received it; the starting point for measuring gain or loss.
- [RSU (restricted stock unit)](https://allocateai.io/glossary/rsu) — A promise from your employer to give you shares of company stock on a future date, as long as you are still there when that date arrives.

**Plan in plain language.**

Allocate answers “can I afford this?” from your own numbers, writes the plan, and stages every change for your yes. It starts from an estimate before you link a bank.

[Get started](https://app.allocateai.io/signup)

---

Allocate AI is a budgeting and financial-planning app: link your accounts, say what you want in plain words, and it writes the plan and stages every change for your approval. Read more at https://allocateai.io or see all pages in https://allocateai.io/llms.txt.
