Tax Lot Selection: Which Losses Should You Harvest?
Which Tax Lots Should You Harvest First?
When you own multiple positions in the same stock or fund—accumulated over years of regular purchases, dividend reinvestments, or inheritance—you face a critical harvesting decision: which shares should you sell? This choice determines whether you harvest the maximum available loss or waste high-loss lots. Buying 100 shares of Apple at $50, then 100 more at $75, then 100 more at $100, gives you an average cost of $75. Today, Apple is at $60, so your entire $10,000 position (300 shares) is underwater by $4,500. But which 100 shares are you selling? The answer dramatically changes your tax outcome. Mastering tax lot selection—the specific identification method, FIFO, average-cost, and other approaches—transforms loss harvesting from a blunt tool into a precise wealth-building strategy.
Quick definition: Tax lot selection determines which specific shares (or units of a fund) you sell when you liquidate a position. Specific ID methods allow you to choose the exact lots sold, maximizing loss harvesting. Default methods (FIFO, average-cost) may waste high-loss lots or create unnecessary gains.
Key takeaways
- Specific identification (choosing exact lots) is the most tax-efficient method and should be your default for harvesting.
- FIFO (first-in-first-out) automatically sells your oldest, lowest-cost shares first—beneficial for long positions but suboptimal for harvesting.
- Average-cost method simplifies tracking but eliminates precision and forfeits harvesting optimization.
- Tax lot selection is irrelevant inside tax-deferred accounts (401k, IRA) but crucial in taxable accounts.
- Document your lot selection method on tax returns and be consistent to avoid IRS audit risk.
The Power of Specific Identification
Specific identification is the IRS-approved method that allows you to designate exactly which shares you're selling before the trade executes. This is the harvester's most powerful tool.
Example: Specific ID in action
You own 300 shares of Apple in a taxable account, purchased over three years:
| Purchase | Date | Quantity | Cost per Share | Total Cost | Today's Price | Current Value | Unrealized Gain/Loss |
|---|---|---|---|---|---|---|---|
| Tranche 1 | 2022 | 100 | $150 | $15,000 | $60 | $6,000 | -$9,000 |
| Tranche 2 | 2023 | 100 | $130 | $13,000 | $60 | $6,000 | -$7,000 |
| Tranche 3 | 2024 | 100 | $110 | $11,000 | $60 | $6,000 | -$5,000 |
| Total | — | 300 | $130 avg | $39,000 | $60 | $18,000 | -$21,000 |
Your position is underwater by $21,000. If you sell 100 shares without specific identification, the IRS assumes you sell the oldest tranche first (Tranche 1), realizing a $9,000 loss. But what if you need to offset a $7,000 gain and want to minimize wash-sale risk? Selling 100 shares of Tranche 2 realizes exactly $7,000 in losses, offsetting your gain perfectly.
If you don't use specific ID:
- Brokerage defaults to FIFO or average-cost.
- You're forced to harvest the full $9,000 loss from Tranche 1.
- You over-harvest by $2,000, creating a carryforward.
- You've wasted the precision of your tax situation.
If you use specific ID:
- You designate Tranche 2 (100 shares) for sale.
- You realize $7,000 loss, offsetting your $7,000 gain perfectly.
- Zero carryforward, zero waste.
- You retain Tranche 1 (still down $9,000) for future harvesting if needed.
This is why specific identification is essential for active harvesting.
FIFO: The Default That Works Against You
FIFO (first-in-first-out) is the IRS default method if you don't specify a lot selection method. It automatically sells your oldest shares first. This works well for long-term wealth building (hold forever, let oldest shares compound) but is suboptimal for harvesting.
Why FIFO is suboptimal for harvesting:
Continuing the Apple example above, FIFO dictates:
- Sell Tranche 1 (oldest, purchased at $150) first.
- Realize the largest available loss: $9,000.
- This is a forced harvest that may exceed your current-year gain offset needs.
FIFO assumes you want to harvest the maximum loss immediately. If you have no gains to offset, you create a carryforward. In years with abundant losses and few gains, FIFO causes waste.
FIFO works when:
- You're in a bear market with massive losses and substantial gains to offset.
- You want to immediately harvest the maximum loss and carry forward the excess.
- You don't need precision and are comfortable with a loss carryforward.
FIFO fails when:
- You have specific gain-offsetting needs (e.g., harvesting exactly $5,000 to offset a $5,000 gain).
- You're in a bull market with scarce losses and want to preserve losses for future years.
- You need to avoid wash sales on certain older, core positions.
Average-Cost Method: The Simplicity Trap
Average-cost (also called average-cost basis) treats all shares as if they were purchased at the average price. It's simple for accounting but eliminates harvesting precision.
How average-cost works:
Using the Apple example:
- Total cost: $39,000 across 300 shares.
- Average cost per share: $130.
- If you sell 100 shares at today's price of $60, you realize a loss of $7,000 (100 × ($130 - $60)).
The problem: You've implicitly sold from all three tranches, not from a specific tranche. This is administratively simple but:
- You can't preserve high-loss lots (Tranche 1 with a $9,000 loss) for future years.
- You can't optimize around wash-sale windows or market recovery.
- If you later sell more shares, your average cost remains identical—you're not "using up" your highest-loss tranches first.
For tax harvesting, average-cost is almost never optimal.
Wash-Sale Considerations in Lot Selection
When you harvest a loss and reinvest in a similar-but-not-identical position, the wash-sale rule disallows the loss if you buy back the same or substantially identical security within 30 days before or after the sale.
Lot selection matters here:
Scenario: You own 300 shares of Apple, all in loss positions. You harvest a loss and plan to reinvest in a different tech fund (avoiding wash sale). But what if:
- You also own a covered call on Apple (selling calls against your shares)?
- The covered call is about to close, and you might re-establish it?
If you sell shares and immediately write new calls on different shares within 30 days, the IRS might argue your covered-call strategy constitutes a wash-sale-like repurchase (disputed but possible). Using specific ID to ensure you sell shares you don't plan to re-cover-call protects you.
Building a Harvesting Lot-Priority System
Create a system to prioritize which lots to harvest:
A Practical Prioritization Framework
When multiple losing positions exist, harvest in this order:
-
Positions you want to reduce or eliminate: If a position doesn't fit your allocation or conviction is low, harvest losses from it aggressively regardless of loss size. Harvesting is a bonus when liquidating.
-
Highest-loss tranches within a position: If a position has multiple cost basis tranches, use specific ID to sell the highest-cost (largest-loss) tranche first. This maximizes the current-year harvest.
-
Positions at risk of recovery: If a position has recovered partially but still has losses, harvest before it recovers further. Delaying risks the loss disappearing.
-
Concentrated positions (tax diversification): Positions that represent >5% of your portfolio should be harvested aggressively to reduce concentration risk while gaining tax benefit. Harvesting is doubly valuable here.
-
Positions with no conviction: If you no longer believe in a holding, harvest its losses on the way to liquidation.
Real-World Examples
Example 1: Precision Harvesting with Specific ID
Tom owns Vanguard Total Stock Market Index in his taxable account:
| Tranche | Date | Shares | Cost | Today's Value | Loss |
|---|---|---|---|---|---|
| 1 | 2018 | 500 | $70,000 | $75,000 | N/A (gain) |
| 2 | 2022 | 300 | $45,000 | $33,000 | -$12,000 |
| 3 | 2023 | 200 | $32,000 | $24,000 | -$8,000 |
He needs to harvest $10,000 in losses to offset a $10,000 gain from an inheritance liquidation. Without specific ID, his broker defaults to FIFO and sells Tranche 1, realizing a $5,000 gain (the opposite of what he needs!). With specific ID, he designates Tranche 2, realizing $12,000 loss, and carries forward $2,000.
Example 2: Avoiding Wash Sales via Lot Selection
Sarah owns 1,000 shares of Tesla across multiple tranches. The position is underwater by $30,000. She wants to harvest the loss but also wants to maintain Tesla exposure (she's bullish long-term). She plans to sell and immediately buy a different growth-focused fund.
If she uses FIFO, she might accidentally trigger a wash sale by repurchasing the same security (Tesla) within 30 days. Instead, she uses specific ID to sell only Tranche 1 (oldest, most core position), harvests the loss, and immediately buys a technology sector fund (different but correlated). She documents the trade confirmation showing specific ID and keeps records to prove she's not repurchasing Tesla directly within 30 days.
Example 3: Carryforward Optimization
David has a $200,000 portfolio with:
- $50,000 position in a tech fund (bought at $60,000, now worth $40,000, loss: $20,000)
- $80,000 position in international bonds (bought at $80,000, worth $70,000, loss: $10,000)
- $70,000 in dividend stocks (all gains or breakeven)
He realizes $15,000 in gains this year (from rebalancing) and expects no gains next year (planning to hold). Without specific ID, he'd harvest both positions ($30,000 loss), use $15,000 against current gains, and carry $15,000 forward. But next year with no gains, the carryforward is wasted against the $3,000 ordinary-income limit.
With specific ID, he harvests only the international bonds ($10,000 loss), offsets his $15,000 gain, and carries $5,000 forward. He holds the tech fund loss in reserve for a future rebalancing or if gains materialize. This preserves optionality.
Common Mistakes
Mistake 1: Forgetting to specify lots at time of sale Many brokerages require you to specify lots before executing the sale. If you forget, they default to FIFO or average-cost. You can sometimes call the brokerage within a short window (same day or next day) to change the lot designation, but this is risky and time-consuming. Always specify lots when placing the trade.
Mistake 2: Harvesting the same lot twice You harvest a loss in July, then sell additional shares from the same tranche in September (forgetting you already sold from it). Depending on how cost basis is updated, this can create double-counting or audit risk. Keep meticulous records of which tranches you've harvested and when.
Mistake 3: Using average-cost for tax harvesting Once you elect average-cost basis for a mutual fund, changing back to specific ID is difficult and may require IRS approval. Use average-cost only for positions you don't plan to harvest. For harvesting candidates, use specific ID from the start.
Mistake 4: Ignoring wash sales when selecting lots You harvest a loss from Tranche 1 of Apple, but you also own covered calls on Apple. If you exercise or roll the calls within 30 days of selling shares, you might trigger a wash sale. Select lots carefully, considering your entire position (shares + options) not just the shares.
Mistake 5: Over-harvesting high-loss lots and wasting them Your position has a $30,000 loss but you have only $5,000 in gains. Using FIFO or harvesting your largest-loss tranche creates a $25,000 carryforward. Consider harvesting a smaller-loss tranche first, preserving the high-loss lot for years with more gains.
FAQ
What if I don't specify a tax lot?
The IRS defaults to FIFO (first-in-first-out) or, for mutual funds, average-cost basis (varies by broker). This eliminates harvesting precision and may not optimize your tax situation.
Can I change my lot selection method after the sale?
Changing from FIFO to specific ID retroactively is difficult. For mutual funds, changing from average-cost to specific ID may require IRS approval (Form 8949). Always specify lots at the time of sale to avoid these complications.
Do tax lots matter inside a 401k or Roth IRA?
No. Tax-deferred accounts have no concept of cost basis or tax lots. You can buy and sell unlimitedly without tax consequence. Lot selection is irrelevant in these accounts.
How do I prove I used specific identification?
Your trade confirmation from the brokerage should show which lot you specified. Keep these confirmations with your tax records. Many brokerages also allow you to view lot selections in the account history. Document this thoroughly to protect against audit.
What if the position spans decades of purchases?
If you've been buying a position for 20 years, you may have 20+ tranches. Use specific ID and prioritize:
- Tranches with the largest losses.
- Tranches you have lowest conviction in.
- Tranches you'd like to remove (concentration, diversification).
Can I harvest a loss and keep the same position long-term?
Yes, if you avoid the wash-sale rule. Sell the position at a loss, buy a similar-but-not-identical position (different fund family, different index, different asset class), and hold the replacement while maintaining similar exposure. This is harvest-and-hold.
What if I inherit shares?
Inherited shares receive a stepped-up basis (typically to fair market value at the date of death). You don't have historical cost basis for older tranches. You can still use specific ID going forward—document the stepped-up basis date and value carefully.
Related concepts
- Tax-Loss Harvesting Basics
- Harvesting and Cost-Basis Tracking
- The Wash-Sale Rule
- When to Harvest Losses
- Capital Gains and Holding Periods
Summary
Tax lot selection is the difference between haphazard harvesting and precision wealth building. Specific identification—designating exactly which shares you sell—allows you to harvest the optimal loss amount, avoid creating unnecessary carryforwards, and preserve high-loss lots for future years. FIFO (the default method) maximizes immediate loss harvest but may waste losses if gains are scarce. Average-cost simplifies accounting but eliminates harvesting precision. By building a prioritized lot-selection system—ranking candidates by loss size, market recovery risk, and allocation fit—you transform tax harvesting from a blunt tool into a surgical strategy. Documentation is critical: specify lots at the time of sale, keep trade confirmations, and maintain records to prove your selections in case of audit. The difference between thoughtless lot selection and strategic prioritization can amount to thousands of dollars in optimized tax benefit over a portfolio lifetime.