FIFO vs Specific Identification: How Tax Lot Selection Can Save You Thousands
April 16, 2026 ยท 10 min read

FIFO vs Specific Identification: How Tax Lot Selection Can Save You Thousands

When you sell shares of a stock or ETF you've purchased over time, FIFO vs specific identification determines which shares are treated as sold โ€” and that single choice can swing your tax bill by thousands of dollars on the same transaction. FIFO (first-in, first-out) automatically sells your oldest shares first. Specific identification lets you choose exactly which tax lot to sell. Most brokerages default to FIFO, and most investors never change it, which means they're often paying far more in capital gains tax than necessary. This article walks through both methods with real numbers, shows exactly when each one wins, and explains why specific identification is the single most underused lever in tax-efficient investing.

What Is a Tax Lot, and Why Does It Matter?

Every time you buy shares โ€” whether it's 10 shares of AAPL on a Monday or 50 shares through a dividend reinvestment two months later โ€” that purchase creates a distinct tax lot. Each lot has its own cost basis (what you paid per share) and its own holding period (how long you've owned it). When you eventually sell, the IRS needs to know which lot you sold, because different lots produce different gains, different holding periods, and therefore different tax rates.

Consider an investor who bought 100 shares of a stock four separate times over two years. They now hold 400 shares across four lots, each with a different cost basis. If the stock is trading at $150 and they want to sell 100 shares, the tax outcome depends entirely on which lot gets sold. If Lot A was purchased at $80, that's a $7,000 gain. If Lot D was purchased at $140, that's a $1,000 gain. Same sale, same 100 shares, same proceeds โ€” but a 7x difference in taxable gain.

This is the core reason tax lot optimization exists. The method you choose isn't a minor detail. It's the mechanism that determines your actual tax bill.

How FIFO Works โ€” and Where It Fails

FIFO is the default cost basis method at most major brokerages, including Schwab, Fidelity, and Vanguard. Under FIFO, when you sell shares, the broker automatically selects the oldest lot first. You don't choose. The system does it for you.

In a market that's risen over time โ€” which describes most long periods in U.S. equity history โ€” FIFO will consistently sell your lowest-cost-basis shares first. That means it maximizes your taxable gain on every sale.

There's one genuine advantage to FIFO: it almost always sells shares held longer than 12 months, which qualifies gains for long-term capital gains rates (0%, 15%, or 20% for 2026) rather than short-term rates (up to 37%). For investors in the 15% long-term bracket, this matters. But FIFO's tax advantage from long-term treatment often gets overwhelmed by the sheer size of the gain it forces you to realize.

Here's where FIFO specifically hurts investors:

If you've been buying shares of the same fund or stock over several years, your oldest lots likely have the lowest cost basis. FIFO forces those out first, creating the largest possible taxable event. You might have a recent lot sitting at a near-zero gain โ€” or even a loss โ€” but FIFO ignores it entirely. The system is blind to cost basis. It only sees purchase date.

How Does Specific Identification Reduce Your Tax Bill?

Specific identification is the alternative the IRS permits under Treasury Regulation ยง1.1012-1(c). Instead of defaulting to a chronological order, you tell your broker exactly which tax lot to sell before executing the trade. This gives you control over three variables simultaneously: the size of the gain (or loss), whether it's short-term or long-term, and how it interacts with your overall income for the year.

At most online brokerages, selecting specific lots takes about 15 seconds. When you enter a sell order, you'll see an option for cost basis method โ€” typically a dropdown or a link that says something like "select lots." You choose the lot, confirm, and execute. The broker documents your selection, satisfying the IRS requirement for contemporaneous identification.

The IRS is clear on one rule: you must identify the specific lot before or at the time of the sale. You cannot retroactively assign lots when you're preparing your tax return in April. If you don't specify, FIFO applies by default.

Within specific identification, there are common strategies that brokers often pre-program as options:

HIFO (Highest-In, First-Out) sells the lot with the highest cost basis first, minimizing the taxable gain. This is often the best choice for tax loss harvesting or reducing current-year capital gains.

LIFO (Last-In, First-Out) sells the most recently purchased lot first. This may sell higher-basis shares, but because those shares are often held less than a year, the gain may be taxed at short-term rates.

Tax Lot Optimizer (available at Schwab and some other brokers) uses an algorithm that considers both cost basis and holding period to minimize taxes. It's essentially automated specific identification.

All of these โ€” HIFO, LIFO, and optimizer strategies โ€” are implementations of specific identification. The IRS recognizes only two methods: FIFO and specific identification. Everything else is a flavor of specific ID.

The $8,340 Worked Example

Let's put real numbers on this. Meet David, a married-filing-jointly investor in the 24% ordinary income bracket with $220,000 in household income. He's held shares of a broad market ETF (VTI) for several years, bought in four separate lots:

| Lot | Purchase Date | Shares | Cost Basis/Share | Total Basis | Holding Period | |-----|--------------|--------|-----------------|-------------|----------------| | A | Jan 2022 | 200 | $195 | $39,000 | 4+ years (LT) | | B | Aug 2023 | 150 | $210 | $31,500 | 2+ years (LT) | | C | Mar 2025 | 100 | $270 | $27,000 | 1+ year (LT) | | D | Nov 2025 | 100 | $285 | $28,500 | 5 months (ST) |

Today's price: $290 per share. David needs to sell 200 shares to fund a home renovation. Proceeds: 200 ร— $290 = $58,000.

Under FIFO, the broker sells Lot A (all 200 shares, the oldest):

  • Gain: $58,000 โˆ’ $39,000 = $19,000 long-term gain
  • At the 15% long-term rate: $19,000 ร— 0.15 = $2,850 in federal tax
  • David's household income of $220,000 also exceeds the $250,000 MAGI threshold for the net investment income tax when you add the $19,000 gain, pushing his MAGI to $239,000. Actually, he's still just under โ€” no NIIT this year. But barely.
  • Total federal tax: $2,850

Under Specific Identification (HIFO strategy), David sells 100 shares from Lot D and 100 shares from Lot C:

  • Lot D gain: 100 ร— ($290 โˆ’ $285) = $500 (short-term)
  • Lot C gain: 100 ร— ($290 โˆ’ $270) = $2,000 (long-term)
  • Total gain: $2,500
  • Tax on Lot D: $500 ร— 0.24 (ordinary income rate) = $120
  • Tax on Lot C: $2,000 ร— 0.15 = $300
  • Total federal tax: $420

The difference: $2,850 โˆ’ $420 = $2,430 saved on this single transaction.

But the story doesn't end there. David's old Lot A โ€” with its $195 basis โ€” remains in his portfolio. Those shares continue to grow, and if David holds them until death, his heirs receive a stepped-up cost basis, eliminating the embedded gain entirely. If David lives another 30 years and those shares appreciate at 8% annually, the stepped-up basis could erase over $100,000 in unrealized gains from his estate.

Now scale this across a portfolio with multiple positions and multiple sales per year. An investor making four or five similar sales annually could save $8,000 to $12,000 per year simply by switching from FIFO to specific identification. Over a decade, that compounds into a six-figure difference in after-tax wealth.

When Does FIFO Actually Win?

FIFO isn't always the wrong choice. There are specific situations where it produces a better outcome:

When your oldest lots have the highest basis. If you bought heavily near a market peak and the stock has since declined or only modestly recovered, your oldest shares might carry the highest cost basis. In that scenario, FIFO and HIFO produce the same result, and FIFO's simplicity is an advantage.

When you want to realize long-term gains in the 0% bracket. For 2026, married couples filing jointly pay 0% long-term capital gains tax on taxable income up to $98,900. Single filers pay 0% up to $49,450. If you're in or near this bracket โ€” common for retirees or in a gap year between jobs โ€” FIFO's tendency to sell long-held, low-basis shares actually works in your favor. You're realizing gains that would otherwise be taxed at 15% or 20% later, and paying nothing now. This is sometimes called "gain harvesting," and it's one of the few scenarios where maximizing the gain is the optimal tax move.

When all lots have similar cost bases. If you dollar-cost-averaged into a position over a short window, the per-share cost difference between lots may be negligible. In that case, the method barely matters, and FIFO's simplicity saves time.

The Interaction With Tax Loss Harvesting

Specific identification is what makes tax loss harvesting precise rather than blunt. When you're harvesting a loss, you want to sell the lot with the largest unrealized loss โ€” not whatever lot happens to be oldest. FIFO might sell a lot with a gain when you're trying to realize a loss, or it might sell a lot with a smaller loss than what's available.

Consider an investor with three lots of the same ETF:

  • Lot X: 50 shares, basis $300/share, current price $260, unrealized loss of $2,000
  • Lot Y: 50 shares, basis $280/share, current price $260, unrealized loss of $1,000
  • Lot Z: 50 shares, basis $240/share, current price $260, unrealized gain of $1,000

If this investor wants to harvest a loss and sells 50 shares under FIFO, the broker sells Lot X (the oldest) โ€” which happens to be the best choice here. But if the lots were ordered differently by date, FIFO could sell Lot Z and generate a gain when the entire purpose was to harvest a loss.

Specific identification eliminates this risk. You always sell the lot that produces the tax outcome you want. For systematic tax loss harvesting, this is non-negotiable. It's why platforms like TaxHarvest use specific identification by default.

How to Switch Your Default Cost Basis Method

Every major brokerage lets you change your default cost basis method. Here's what to know:

You can change your default at the account level. At Schwab, Fidelity, and Vanguard, this is typically found under account settings or tax preferences. The new default applies to future sales only โ€” it doesn't retroactively change past transactions.

Even if you leave the default as FIFO, you can override it on any individual trade by selecting specific lots at the time of sale. This is a per-trade decision, and it's perfectly legal to use FIFO for one sale and specific identification for the next.

For mutual fund shares, average cost is also available as a method. But average cost, once elected for a fund, locks in for all existing shares of that fund. It's generally less tax-efficient than specific identification for anyone doing active tax management.

The IRS does not require you to notify them when switching methods. You simply make the selection at your brokerage before executing each sale, and the broker's confirmation serves as your documentation.

The Real Cost of Doing Nothing

Most investors never touch their cost basis settings. They open a brokerage account, leave FIFO as the default, and never think about it again. For someone with a $500,000 portfolio who makes a few sales per year, the accumulated cost of this passivity can easily reach $50,000 to $80,000 over a 20-year period.

That number isn't hypothetical. It's the compound effect of consistently realizing larger gains than necessary, paying 15-20% tax on those excess gains, and losing the future growth of the money paid in taxes. A $2,400 annual tax savings invested at 8% grows to approximately $110,000 over 20 years. That's the wealth gap between an investor who takes 15 seconds to select lots and one who doesn't.

The irony is that specific identification requires almost no effort. You're not doing extra research. You're not picking stocks. You're not timing the market. You're simply telling your broker which shares to sell โ€” a choice the system is already making for you, just poorly.

Tax lot selection is one of the rare cases in personal finance where the smarter choice is also the easier one. FIFO exists for administrative convenience. Specific identification exists for your benefit. The only question is whether you'll take the 15 seconds to use it.

Ready to stop overpaying taxes?

Our average customer saves $30,000/year. See what you could save.

Get started free