FIFO vs Specific ID: The Tax Lot Choice Worth $2,430 on One Sale
April 16, 2026 · 10 min read

FIFO vs Specific ID: The Tax Lot Choice Worth $2,430 on One Sale

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.

For a deeper exploration of how holding period interacts with basis to determine the optimal lot across multiple scenarios, see the software that automates the choice — it evaluates basis, holding period, and bracket simultaneously across all your accounts.

This is also why tax loss harvesting software matters for investors who already like their portfolio. The software can evaluate the same sale across every available lot, not just the brokerage default, then suggest the lot that best fits the investor's current tax position.

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.

The $2,430 worked example

You need to raise $60,000 and sell shares currently worth that much. Under FIFO, the oldest lots have a basis of $35,000, so you realize a $25,000 gain. Using specific identification, you pick recent lots with a $47,150 basis, realizing a $12,850 gain instead. The difference is $12,150 of gain avoided. At the 20% long-term rate, that one choice saves $2,430 in tax — $2,892 at 23.8% with NIIT. Same sale, same cash, same investment position. The only variable is which lots you selected.

Want this math run on your actual lots? Try the tax loss harvesting calculator →


See your annual savings estimate. Connect your brokerage accounts in about two minutes. Get started free →

Frequently asked questions

What is the difference between FIFO and specific identification?
FIFO sells your oldest shares first, which after a long bull market usually means your lowest-basis, highest-gain lots. Specific identification lets you choose exactly which lots to sell. On the same sale, picking high-basis lots shrinks the realized gain, often by thousands of dollars in tax.
Is FIFO or specific identification better for taxes?
Specific identification, almost always. It lets you sell the highest-basis lots to minimize gains, or the loss lots to harvest them. FIFO is just the default your brokerage applies when you don't choose. The catch: you must designate the lot at or before the sale, not at tax time.
How do I change my cost basis method at my brokerage?
Every major brokerage lets you set the default cost basis method in account settings and pick lots at order entry, but each one only sees its own accounts. TaxHarvest computes the optimal lot across E*TRADE, Fidelity, Schwab, Robinhood, and Interactive Brokers simultaneously and tells you exactly which to sell.
Stop overpaying — get started free →