Skip to main content
My ETF
tax planning8 min readCould save you $2,500+/year in taxes

Specific Lot Identification: Optimizing Gains

When you sell part of a position, which shares actually leave your account? With specific lot identification, you decide, and that choice can dramatically change your tax bill.

Alex Harrington··Updated June 21, 2026
TL;DR8 min read

Don't have time? Here's what you need to know:

  • 1Every purchase is a separate tax lot with its own cost basis and holding period; which lots you sell determines your taxable gain.
  • 2Specific lot identification gives the most tax control, while the FIFO default often sells your lowest-cost, highest-gain shares first.
  • 3Sell high-cost, long-term lots to minimize gains, and avoid lots just short of the one-year long-term threshold.
  • 4Preserving low-cost lots pairs with the step-up in basis at death, so spec ID supports both current and estate tax planning.

Every Purchase Creates a Tax Lot

Each time you buy shares of an ETF, you create a 'tax lot': a batch of shares with its own purchase date and its own cost basis, the price you paid. Buy the same fund every month for years and you accumulate dozens of lots, each bought at a different price. As long as you hold them all, the lots are invisible. The moment you sell only part of the position, it suddenly matters enormously which specific lots you are selling, because each one carries a different built-in gain or loss and a different holding period.

Your taxable gain is the difference between what you sell for and the cost basis of the shares sold. Sell shares from a high-cost lot and your gain is small or even negative; sell from a low-cost lot bought years ago and your gain can be large. Same sale price, same fund, wildly different tax. Specific lot identification, sometimes called 'specific share identification' or 'spec ID,' is the cost-basis method that lets you choose exactly which lots leave your account, and therefore control the tax outcome.

Spec ID vs FIFO vs Average Cost

Brokers offer several cost-basis methods, and the default is rarely the most tax-efficient. FIFO ('first in, first out') sells your oldest shares first, which for a long-appreciating fund usually means selling your lowest-cost, highest-gain lots, the worst result for current-year tax. Average cost lumps all your shares into one blended basis, which is simple but strips away your ability to pick and choose. For ETFs and individual stocks, specific lot identification gives you the most control.

The difference is not academic. In a rising market, choosing the highest-cost lots to sell can cut a taxable gain by a wide margin compared with the FIFO default, or let you sell at a loss for harvesting purposes while keeping your low-cost shares untouched. Average cost, once elected for a fund, can be hard to switch away from, so investors who want flexibility generally avoid locking into it for positions they expect to manage actively.

MethodWhat it sellsTax controlBest for
Specific lot IDLots you chooseHighestActive tax management
FIFOOldest shares firstLowSimplicity, often worst tax in a bull market
Average costBlended-basis sharesLowSet-and-forget mutual fund holders
Highest-cost first (HIFO)Highest-basis lotsHigh (automated)Minimizing current gains automatically

Tip: Check your brokerage's default cost-basis method and change it to specific lot identification before you ever sell. Some brokers require you to choose the method at the time of the trade, not after.

Choosing Lots to Match Your Tax Goal

The right lot to sell depends on what you are trying to do. To minimize the tax on a sale, sell your highest-cost long-term lots first, which produces the smallest possible gain while still qualifying for the preferential long-term capital gains rate. To harvest a loss, sell the lots whose basis is above the current price, banking a deductible loss while leaving appreciated shares alone. To intentionally realize gains in a 0% bracket year, you might instead pick your lowest-cost long-term lots.

Holding period is just as important as basis. A lot held one year or less produces a short-term gain taxed at your ordinary income rate, which can be far higher than the long-term rate. When two lots have similar basis, favor selling the one that is already long-term, and be especially careful not to sell a lot that is just days short of crossing the one-year line. Specific lot identification lets you see and act on both dimensions, basis and holding period, lot by lot.

Why Spec ID and the Step-Up in Basis Work Together

Specific lot identification also dovetails with longer-term estate planning. Under current law, assets held until death receive a 'step-up in basis,' meaning heirs inherit them with a cost basis reset to the value on the date of death, erasing the unrealized gain for tax purposes. That makes your oldest, lowest-cost lots the most valuable ones to hold onto, because they carry the largest embedded gain that a step-up could eventually wipe out.

Spec ID lets you act on that insight. When you need to raise cash during your lifetime, you can deliberately sell your higher-cost, smaller-gain lots and preserve the deeply appreciated low-cost lots for a potential step-up later. Without lot-level control, a FIFO default would do the opposite, draining your most appreciated shares first and squandering the step-up opportunity. Pairing specific lot identification with tax-efficient ETFs gives you fine-grained control over which gains you realize now and which you let ride.

Important: Keep your own records and confirm each sale's lot selection on the trade confirmation. Brokers report basis to the IRS on Form 1099-B, and a mismatch between your intended lots and what the broker recorded can create reconciliation headaches at filing.

A Practical Routine for Lot Selection

Set the foundation once: log into your brokerage, change the default cost-basis method to specific lot identification (or its automated cousin, highest-cost-first), and make sure tax-lot detail is visible in your account. From then on, before any partial sale, open the lot list, sort by basis and holding period, and choose deliberately rather than letting a default decide for you.

A few habits keep it clean. Avoid average cost on positions you plan to manage actively, since it removes your flexibility. When buying back in after a sale, remember the wash-sale rule on losses, which can disallow a harvested loss if you repurchase a substantially identical security within 30 days. And because the lot you pick today affects the gain you realize and the step-up you preserve for decades, treat each sale as a small, deliberate tax decision rather than a mechanical click.

Want the full framework? This 2-hour ETF course teaches you exactly how to pick, buy, and hold profitable ETFs — from zero to confident investor. Under $15.

Frequently Asked Questions

What is the difference between specific lot identification and FIFO?

FIFO automatically sells your oldest shares first, which in a rising market usually means selling your lowest-cost, highest-gain lots and creating the largest taxable gain. Specific lot identification lets you choose exactly which lots to sell, so you can pick high-cost lots to minimize the gain or specific lots to harvest a loss. Spec ID gives you control; FIFO takes it away.

Can I switch to specific lot identification after I've already bought shares?

Usually yes for ETFs and stocks, as long as you haven't elected average cost and locked it in. Set the method before you sell, since many brokers require you to designate the lots at the time of the trade rather than afterward. Average cost, once chosen for a fund, can be difficult to reverse, so avoid it on positions you want to manage.

Which lots should I sell to pay the least tax?

Generally your highest-cost lots that are also long-term (held more than a year), because they produce the smallest gain while still qualifying for the preferential 0%/15%/20% rate. If you're harvesting a loss, sell lots whose basis is above the current price. Always check the holding period so you don't accidentally trigger a higher short-term rate.

How does specific lot identification relate to inheritance?

Under current law, assets held until death get a 'step-up in basis,' resetting their cost basis to the date-of-death value and erasing the unrealized gain for heirs. Spec ID lets you sell higher-cost lots during your lifetime while preserving your deeply appreciated low-cost lots for that step-up, maximizing the long-term tax benefit.

Further Reading

Free Tools

AH

Alex Harrington

CFA Level II Candidate, Finance & Economics

Alex Harrington is an independent ETF researcher and personal finance writer with over 8 years of experience analyzing exchange-traded funds. A CFA Level II candidate with a background in economics, Alex has reviewed 800+ ETFs and helped thousands of beginners build their first investment portfolios through clear, jargon-free education.

Our methodology →

This content is for educational purposes only and does not constitute financial advice. Past performance does not guarantee future results. Consult a licensed financial advisor before making investment decisions.

Related Articles