⚠️ Educational content only. Trading involves substantial risk of loss and is not suitable for everyone. Read our Risk Disclaimer.

The Big Idea

Tax lots are individual purchases of a security, each tracked with its own cost basis (price paid) and acquisition date. When you buy 100 shares of a stock at one price and 100 more shares later at a different price, you have two separate tax lots — even though they’re the same stock in the same account. When you sell, you can choose which tax lot you’re selling from, and that choice affects your reported gains or losses for taxes. The three main methods for selecting which lots to sell are FIFO (First In, First Out), LIFO (Last In, First Out), and Specific Identification. Each produces different tax consequences from the same physical sales.

Think of tax lots like cans of soup in your pantry. If you bought soup at different times for different prices — some when soup was on sale, some at full price — each “lot” of soup has its own cost. When you grab a can to use for dinner, you might not care which one. But for tax accounting purposes, it matters which one you “sold” because some cost more than others. Your accountant could say “you used the oldest can” (FIFO), “you used the newest can” (LIFO), or “you specifically chose this can” (Specific ID). Same dinner, but different reported costs depending on the method. In trading, the analog is exactly this: same shares sold, but different reported gains depending on which tax lots you assigned to the sale.

Most beginners don’t think about tax lots because they only have one purchase per stock. As your trading evolves and you accumulate positions over multiple purchases, tax lot management becomes a real tool for tax optimization. The choice between FIFO, LIFO, and Specific ID can mean meaningful differences in your annual tax bill — sometimes thousands of dollars on otherwise identical trading activity. Understanding how to use tax lots is one of the more practical financial skills active traders develop.


How Tax Lots Are Created

Every purchase creates a new tax lot. The lot records:

Example of Tax Lots Building

You buy XYZ stock multiple times:

Date Shares Price Cost Basis Lot ID
Jan 15, 2023 100 $50 $5,000 Lot 1
April 10, 2023 100 $60 $6,000 Lot 2
July 22, 2023 100 $55 $5,500 Lot 3
October 5, 2023 100 $70 $7,000 Lot 4

You now own 400 shares with total cost basis of $23,500. But these shares aren’t all the same — they’re four distinct tax lots with different costs and dates.

What Happens When You Sell Some

If you sell 200 shares, you need to decide which 200 of your 400 to “sell.” This is where tax lot methods come in.


Method 1: FIFO (First In, First Out)

FIFO sells your oldest shares first. The shares you bought longest ago are deemed sold before more recently purchased shares.

How It Works

From the example above, if you sell 200 shares using FIFO:

Tax Implications

If current price is $80 and you sell 200 shares for $16,000:

When FIFO Helps

When FIFO Hurts


Method 2: LIFO (Last In, First Out)

LIFO sells your newest shares first. The shares you bought most recently are deemed sold before older shares.

How It Works

From the same example, selling 200 shares using LIFO:

Tax Implications

If selling for $16,000:

When LIFO Helps

When LIFO Hurts

The Holding Period Trade-off

LIFO often produces lower gains but at higher tax rates because newer shares are typically short-term. This is why LIFO isn’t always advantageous despite producing lower reported gains.


Method 3: Specific Identification

Specific Identification (often called “Specific ID” or “SpecID”) lets you choose exactly which lots to sell from. It provides the most flexibility for tax optimization.

How It Works

Before placing a sell order, you specify which tax lots you’re selling. Most modern broker platforms allow this through trade ticket options or post-trade lot allocation.

Strategic Lot Selection

From our example, selling 200 shares optimally:

Pros of Specific ID

Cons of Specific ID


Other Methods

Average Cost

Average Cost calculates an average cost across all your shares. Common for mutual funds, less common for individual stocks (where it’s not allowed for regular brokerage accounts but is for some types).

Highest Cost First

Some brokers offer “Highest Cost First” as an alternative to LIFO. It sells your highest-cost shares regardless of date, minimizing gains directly. This is essentially a variant of Specific ID with automatic optimization.

Lowest Cost First

The opposite — sells lowest-cost shares first. Maximizes gains. Rarely the desired strategy unless trying to use up available losses or for specific planning purposes.

Min Tax

Some brokers offer “minimum tax” algorithms that select lots to minimize current-year tax impact. The algorithm balances gain size with holding period (long-term vs short-term) for optimal tax outcome.


Setting Default Methods

Most brokers let you set your preferred method:

FIFO is the typical default if you don’t change it. Active traders often set Specific ID as default for maximum control, then make decisions per trade.

Important Timing

For tax purposes, you must specify the method at or before the time of sale. Telling your broker to apply Specific ID retroactively isn’t allowed — you can’t reclassify last year’s sales.

This means making lot selection decisions in real-time during trading or shortly after.


Examples of Tax Lot Strategies

Example 1 — Sarah’s Long-Term Strategy

Sarah holds 4 lots of XYZ stock. The oldest two are at low cost basis ($30 each) and held over a year. The newer two are at higher cost basis ($60 each) and held under a year.

Stock is at $50. She wants to sell 100 shares.

Options:

If she has other capital gains to offset, LIFO gives her the loss. If she wants to lock in gains at favorable long-term rates, FIFO works. The choice depends on her overall tax picture.

Example 2 — Jake’s Active Trading

Jake actively trades AAPL, accumulating multiple lots over months at various prices. Some are profitable, some are losses, some are short-term, some long-term.

By year end, he wants to:

Specific ID is essential for him. He selects loss lots when closing positions to harvest losses, selects long-term lots when forced to take gains, and times remaining sales for optimal year-end planning.

Without Specific ID, he’d accept whatever FIFO produces, missing significant tax optimization opportunities.

Example 3 — Maya’s Index Investing

Maya invests in index ETFs through dollar-cost averaging — buying small amounts every month for years.

After 5 years, she has 60+ lots of the same ETF at various prices.

When she eventually sells, the lot selection matters:

Many long-term investors don’t bother optimizing because their gains are mostly long-term anyway. But Specific ID still allows fine-tuning the gain magnitude in any specific year.


Tax Lots and Wash Sales

Tax lots interact with wash sale calculations.

Wash Sale Affects Specific Lots

When a wash sale occurs, the disallowed loss adjusts the cost basis of specific replacement lots. This complicates accounting because lots you bought after a wash sale have inflated cost basis.

Example

You sell 100 shares for $1,000 loss (wash sale violation). Replacement 100 shares had $5,000 cost basis. After wash sale adjustment: $5,000 + $1,000 = $6,000 cost basis.

This $6,000 stays with that specific tax lot. Future selling decisions need to account for the inflated basis.

Tracking Complexity

Active traders with many wash sales accumulate complex tax lot structures. Different lots have different effective cost bases due to various wash sale adjustments. Specific ID becomes important for managing this complexity.


Common Mistakes

  1. Not knowing about Specific ID. Accepting FIFO defaults loses optimization opportunities.
  2. Selecting lots after sale. Most brokers require selection at or before sale time.
  3. Confusing LIFO with Highest Cost First. Similar but not identical methods.
  4. Not tracking holding periods. Short-term vs long-term creates different tax rates.
  5. Ignoring wash sale adjustments. Adjusted basis affects which lots are most attractive to sell.
  6. Annual default doesn’t match strategy. Setting wrong method at account level.
  7. Forgetting to override defaults. Accepting FIFO when Specific ID would help.
  8. Tax-aware trading missing the data. Not knowing your lot composition before deciding to trade.
  9. Mutual fund Average Cost confusion. Different rules apply to different security types.
  10. Mixing accounts. Tax lots are per-account; can’t combine across brokers.

The Big Picture

Tax lots are a powerful but underused tool for tax optimization.

Here’s what to remember:

Tax lot management is one of those topics that seems boring until you realize how much it affects your taxes. The differences between FIFO and Specific ID can be thousands of dollars annually for active traders. Even casual investors can benefit from optimizing year-end sales.

For most beginners with limited trading volume, FIFO works fine. The simplicity outweighs the marginal tax savings of Specific ID. As your trading grows in complexity and frequency, switching to Specific ID becomes increasingly worthwhile.

Active traders should default to Specific ID. The flexibility allows year-round tax planning rather than waiting until year-end for limited harvesting opportunities. You can adjust your approach based on current-year tax projections, capital gains balance, and other factors.

The biggest mistake: not knowing tax lots exist. Many traders accept whatever the broker shows them without realizing they had choices that could have meaningfully reduced their tax bill.

Practical advice for implementation:

For complex trading situations, professional help is worth considering. A CPA familiar with trader taxation can identify optimization opportunities you might miss. The cost of tax preparation often pays for itself many times over through proper planning.

The intersection of tax lots and other rules (wash sales, PDT) creates complexity that rewards organized record-keeping. Brokers do automatic tracking but can miss things involving multiple accounts. Personal records help.

One final note: tax laws change. The current rules around tax lots, holding periods, and capital gains rates aren’t permanent. Long-term planning should account for the possibility of rule changes. But within current rules, knowing how to use tax lots effectively is a meaningful financial skill.

Master tax lot management and you’ve added another tool to your trader toolkit. It’s not glamorous but the savings compound over time. Active traders who use tax lots well retain meaningfully more of their gains compared to those who don’t.


Related Terms

← Back to the Complete Trading Terms Glossary

Focus on the process. Trust the stats. Stay consistent.