What Is the Tax Lot ID Method and How Does It Work?

The tax lot ID method is the rule that decides which specific shares your broker treats as sold when you unload part of a position you built up at different prices. Each purchase of the same security creates its own tax lot with its own cost basis and holding period, and the method you pick controls which lot’s basis gets used at sale time. That choice moves your taxable gain up or down, sometimes by a lot, on the exact same trade.

If you say nothing, your broker uses First-In, First-Out. If you want a different result, you have to ask for it, and usually you have to ask before the trade settles.

Why the Method Changes Your Tax Bill

Two forces make lot selection matter. The first is the spread between short-term and long-term capital gains rates. Shares held one year or less are taxed as ordinary income, which for most investors lands somewhere between 22% and 37%. Shares held longer than a year qualify for long-term rates of 0%, 15%, or 20% depending on your taxable income.1Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates Higher earners also owe an additional 3.8% net investment income tax on capital gains once modified adjusted gross income clears $200,000 single or $250,000 joint.2Internal Revenue Service. Topic No. 559, Net Investment Income Tax

The second force is the size of the gain itself. Selling a lot you bought at $30 produces a much bigger gain than selling a lot of the same stock you bought at $90, even if today’s price is identical for both. Rate and gain size multiply together. When you can steer the sale toward a high-basis, long-held lot instead of a low-basis, recently purchased one, you can cut the tax on a single trade by more than half.

FIFO: The Default You Probably Have Now

Under First-In, First-Out, the shares you bought earliest are the shares treated as sold. Federal regulations require this whenever a taxpayer fails to make an adequate identification of which specific shares were sold: the earliest-acquired shares are deemed sold first.3eCFR. 26 CFR Part 1 – Basis Rules of General Application

In a position that has appreciated over time, FIFO sells your cheapest shares first, which maximizes your taxable gain. The consolation is that the earliest lots are usually old enough for long-term treatment, so at least the gain gets the lower rate. Fine when your lots have similar prices or when you plan to sell the whole position anyway. Painful when you want to trim the position with the smallest possible tax hit, and especially painful when you are trying to harvest a loss and FIFO is busy selling the wrong shares.

Specific Identification: The Method With Real Control

Specific identification lets you name the exact lot to be sold. The cost basis and holding period of that lot determine your tax outcome. Common uses:

  • Sell your highest-basis shares to keep a gain small.
  • Sell a losing lot to harvest a deductible loss. Capital losses offset capital gains dollar for dollar, and up to $3,000 of net losses per year can offset ordinary income ($1,500 if married filing separately), with anything left carrying forward indefinitely.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses
  • Pick a lot held longer than a year to lock in long-term rates instead of ordinary income treatment.

The IRS is strict about what counts as a valid specific identification. You must tell your broker which particular shares to sell at the time of the sale, and you must receive written confirmation of that instruction within a reasonable time.5Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses The identification must be made no later than the trade’s settlement date.3eCFR. 26 CFR Part 1 – Basis Rules of General Application Most online brokers let you pick lots on the order ticket or adjust the selection in the account before settlement. Miss that window and the sale reverts to whatever default you have on file, usually FIFO.

The catch is that specific identification is an active decision every time. There is no way to set it and forget it; if you forget to specify lots on one trade in the middle of a careful plan, that trade will not follow the plan.

Automated Methods: High-Cost, LIFO, and Others

Most brokers let you set an automated method as your standing default. These are preset rules that pick a lot for you without a manual selection on each trade.

The most useful for taxable accounts is the high-cost lot method, sometimes called highest-in, first-out. It sells the shares with the highest cost basis first, regardless of purchase date, which produces the smallest gain or largest loss on every sale. Setting high-cost lot as your account default catches the trades where you forget to pick a lot manually. You can still override it with a specific identification when a particular trade calls for a different lot.

Other automated options common at brokerages:

  • Last-in, first-out sells your most recently purchased shares first. In a rising market these often have a higher basis than older lots, but recently bought shares may not have been held long enough for long-term rates.
  • Lowest-cost is the opposite of high-cost lot. It sells the cheapest shares first and maximizes gains, which is rarely helpful in a taxable account.
  • Tax-sensitive or tax-optimized is a proprietary method some brokers offer that considers cost basis and holding period together to try to minimize the tax on each sale.

Average Cost: The Mutual Fund Exception

The average cost method pools all your shares of a particular mutual fund, divides your total investment by the total number of shares, and gives every share the same basis. When you sell, every share carries that same figure. The IRS restricts the method to mutual fund shares and shares acquired through dividend reinvestment plans.6Internal Revenue Service. Mutual Funds (Costs, Distributions, etc.) 1 You cannot use it for individual stocks or most ETFs.

Average cost simplifies life for funds that reinvest dividends monthly and pile up dozens of tiny lots. Many brokers default mutual fund accounts to it for that reason. The tradeoff is that you give up the ability to cherry-pick a high-basis or losing lot when you sell.

Watch the revocation rules. For covered mutual fund shares (those acquired after 2011), you can generally revoke an average cost election if you do so before making the first sale of those shares. The IRS FAQ points to Publication 550 for the procedures.7Internal Revenue Service. Mutual Funds Costs and Distributions FAQ Once you have sold shares under average cost, though, you generally cannot switch those same shares back to another method. If you think you might ever want to pick specific lots, elect specific identification before your first sale from the fund.

Loss Harvesting and the Wash Sale Trap

Lot selection and the wash sale rule collide constantly. The rule disallows a capital loss if you buy substantially identical shares within 30 days before or after the sale that produced the loss, creating a 61-day danger window counting the sale date.5Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses

The most common accidental wash sale looks like this. You carefully pick a losing lot of a mutual fund or ETF and sell it for a tax loss. Two weeks earlier, a dividend from that same fund was automatically reinvested. That reinvestment counts as a purchase inside the 30-day window, and part or all of your loss gets disallowed. All the effort you put into picking the right lot goes to waste because dividend reinvestment kept running in the background.

A disallowed loss is not gone. The amount adds to the basis of the replacement shares, and the holding period of the sold shares tacks onto them, so the tax benefit survives for a later sale.5Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses But if the point of the harvest was to offset gains this year, deferral defeats the purpose.

Two boundaries worth knowing. The IRS looks across all your accounts, including IRAs. Selling at a loss in a taxable account and repurchasing the same security in an IRA within 30 days triggers the rule, and in that case the loss is permanently disallowed because you cannot adjust the basis of shares inside an IRA. Also, in tax-advantaged accounts themselves, none of this lot analysis affects your current taxes; gains and losses inside an IRA or 401(k) are not taxed when realized. Save the lot-picking effort for your taxable accounts.

If you are harvesting losses, turn off dividend reinvestment on the security before the sale and avoid buying anything substantially identical for at least 31 days.

Inherited and Gifted Shares in the Same Account

Inherited and gifted securities show up in your account as lots with basis figures that can look strange next to shares you bought yourself, which is another reason to keep specific identification handy.

Inherited shares get a stepped-up basis. Your basis resets to the fair market value on the date of the original owner’s death, which can wipe out decades of unrealized gain.8Office of the Law Revision Counsel. 26 U.S. Code 1014 – Basis of Property Acquired From a Decedent Stock your parent bought at $10 and worth $150 at their death becomes a lot with a $150 basis in your hands. The step-up also works downward if the asset lost value.

Gifted shares work the other way. You inherit the donor’s original cost basis, called a carryover basis.9Office of the Law Revision Counsel. 26 USC 1015 Stock your uncle bought at $20 and gifts to you at a market price of $100 becomes a $20-basis lot for you. If the donor’s basis is higher than the fair market value on the gift date, you use the lower fair market value for calculating any loss, which stops donors from shifting paper losses onto someone else.

Stock splits do not create new lots. If you had 100 shares in one lot and the stock splits 2-for-1, you now have 200 shares in the same lot at half the per-share basis, with the holding period unchanged.10Internal Revenue Service. Stocks (Options, Splits, Traders) Your oldest lot stays your oldest lot; the numbers inside it change.

A Practical Setup for a Taxable Account

For most people with a taxable brokerage account, the useful configuration is straightforward. Change the account default from FIFO to the high-cost lot method. That way, routine partial sales automatically produce the smallest gain, even when you are not thinking about taxes.

Then, on any trade where the stakes are larger, override with a specific identification: pick the exact lot you want sold, make the identification by the trade’s settlement date, and keep the written confirmation your broker sends. That combination catches the everyday trades and gives you full control on the ones that matter.

For mutual funds with heavy dividend reinvestment, average cost keeps the recordkeeping simple, but commit only if you are sure you will never want to pick individual lots from that fund. Any doubt, elect specific identification before your first sale.

Whatever method you use, check for wash sale exposure before pulling the trigger on a loss-harvesting trade, and turn off dividend reinvestment on anything you are about to sell at a loss. The 61-day window is where careful lot selection most often gets undone.