The tax lot ID method is the rule your broker uses to decide which specific shares you sold when you liquidate part of a position, and that rule directly controls how much capital gains tax you owe. Every purchase of a security creates a separate “lot” with its own cost basis and holding period. Sell from a high-basis lot and you report a smaller gain; sell from a low-basis lot and the gain is larger, even though the sale price is identical. Choosing the method is one of the few tax decisions you can still make after the money is already invested.
Why the Method Matters
The dollars at stake come from the gap 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% federally. Shares held longer than a year qualify for long-term rates of 0%, 15%, or 20%, depending on taxable income. For 2026, single filers pay 0% on long-term gains up to $49,450 of taxable income, 15% up to $545,500, and 20% above that. Married couples filing jointly hit 15% at $98,900 and 20% at $613,700.1Tax Foundation. 2026 Tax Brackets and Federal Income Tax Rates
High earners face an additional 3.8% net investment income tax on capital gains once modified adjusted gross income exceeds $200,000 for single filers or $250,000 for joint filers.2Internal Revenue Service. Topic No. 559, Net Investment Income Tax That pushes the effective top rate on long-term gains to 23.8%. When the difference between short-term and long-term treatment can top 20 percentage points, the lot you sell is not a rounding error.
One boundary worth naming up front: none of this matters inside IRAs, 401(k)s, or other tax-advantaged accounts, because gains and losses realized inside those accounts are not currently taxed. Lot selection moves the needle only in taxable brokerage accounts.
FIFO: What Happens by Default
If you sell shares without telling your broker which lot to use, the sale defaults to First-In, First-Out. Under FIFO, the shares you bought earliest are the shares treated as sold. Federal regulations require this outcome when the taxpayer fails to make an “adequate identification” of the specific shares sold.3eCFR. 26 CFR Part 1 – Basis Rules of General Application
In a position that has appreciated over time, FIFO sells the cheapest shares first. That maximizes your taxable gain. The offsetting effect is that FIFO usually sells your longest-held shares, so the gain generally qualifies for long-term treatment. Lower rate, bigger gain.
FIFO works fine when your lots have similar cost bases or when you plan to sell the whole position anyway. It hurts in tax-loss harvesting and any situation where you want to keep a specific gain small. If your oldest lot was purchased at $30 and a more recent lot at $90, FIFO forces you to realize the $30-basis gain when you might prefer to sell the $90-basis shares and report almost nothing.
Specific Identification: Picking the Shares Yourself
Specific identification gives you full control. You tell the broker exactly which shares to liquidate, and the cost basis and holding period of that lot determine the tax outcome. It’s the most powerful method available because every sale can be matched to your current tax situation.
Common uses include selling your highest-basis shares to minimize a gain, selling a losing lot to harvest a deductible loss, or picking lots you’ve held longer than a year to lock in long-term rates. Harvested capital losses offset capital gains dollar for dollar, and up to $3,000 of remaining net losses can offset ordinary income each year ($1,500 if married filing separately), with unused losses carrying forward indefinitely.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses
The IRS imposes strict requirements for 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 brokerages let you select lots on the order ticket or adjust the selection in your account before settlement. Skip that step and the sale reverts to whatever default is assigned to your account, usually FIFO.
The catch with specific identification is that it can’t be automated as a standing rule. Every trade needs a decision, and forgetting to pick lots on a single sale can undo a careful plan.
Automated Methods: High-Cost Lot and the Alternatives
Most brokerages offer automated methods that act as preset rules for specific identification. The most useful is the high-cost lot method, sometimes labeled “highest-in, first-out.” It sells the shares with the highest cost basis first, regardless of purchase date. For taxable accounts where minimizing gains is usually the goal, high-cost lot is often the best standing default: it produces the smallest gain (or the largest loss) on every sale without requiring a manual pick.
Other automated options vary by broker but commonly include:
- Last-in, first-out (LIFO), which sells the most recently purchased shares first. In a rising market these tend to have a higher basis than older lots, producing smaller gains. The tradeoff is that recently bought shares may not yet qualify for long-term rates.
- Lowest-cost, the mirror of high-cost lot. It sells the cheapest shares first and maximizes gains. Rarely useful in taxable accounts.
- Tax-sensitive or tax-optimized methods, proprietary approaches some brokers offer that try to minimize tax by weighing basis and holding period together.
Setting high-cost lot as your account default catches the trades where you forget to specify lots. You can always override it with specific identification on any individual sale. Think of it as a safety net that defaults to the tax-efficient choice.
Average Cost: Only for Mutual Funds and DRIPs
The average cost method pools all your shares of a particular mutual fund and divides your total investment by the total number of shares to produce a single per-share basis. Every share carries the same cost regardless of when you actually bought it. The IRS restricts this method to mutual fund shares and shares acquired through dividend reinvestment plans.6Internal Revenue Service. Mutual Funds (Costs, Distributions, etc.) 1 It’s not available for individual stocks or most ETFs in a standard brokerage account.
Average cost simplifies recordkeeping, especially for funds where reinvested dividends create dozens of tiny lots. Many brokerages default mutual fund accounts to average cost for that reason. What you give up is the ability to cherry-pick high-basis or low-basis lots at sale time.
A common misconception is that electing average cost locks you in permanently. That was closer to the truth under older rules, but 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 covered shares. The IRS FAQ directs investors to Publication 550 for the detailed procedures.7Internal Revenue Service. Mutual Funds Costs and Distributions FAQ Once you’ve sold shares under average cost, however, you generally can’t switch those same shares back to another method. If you want flexibility, elect specific identification before your first sale from the fund.
The Wash Sale Trap
Lot selection and the wash sale rule collide more often than most investors realize. The wash sale rule disallows a capital loss if you buy substantially identical shares within 30 days before or after the sale that generated the loss. That creates a 61-day window (counting the sale date) during which repurchasing the same security wipes out the tax benefit of the loss.5Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses
Here’s the practical failure mode. You sell 100 shares of a fund at a loss for tax-harvesting purposes, but two weeks earlier you had dividends automatically reinvested in the same fund. Those reinvested shares count as a purchase inside the 30-day window, and part or all of your loss gets disallowed. This is the most common accidental wash sale, and it catches investors who carefully picked their losing lot but forgot about the reinvestment running on autopilot.
A disallowed loss is not gone forever. It gets added to the cost basis of the replacement shares, which preserves the economic benefit for a future sale.5Internal Revenue Service. Publication 550 (2025), Investment Income and Expenses The holding period of the shares you sold also carries over to the replacement shares. The loss is deferred, not destroyed. But if you were counting on that loss to offset gains this year, deferral defeats the point.
The IRS looks across all your accounts at every institution when applying the rule. Selling a stock at a loss in your taxable brokerage account and buying it back in your IRA within 30 days still triggers a wash sale, and in that case the loss is permanently disallowed because you can’t adjust the basis of IRA shares. Anyone actively harvesting losses should turn off dividend reinvestment on the security being sold and avoid repurchasing anything substantially identical for at least 31 days.
A Practical Setup for Most Investors
For most people with taxable brokerage accounts, the sensible configuration is to change your account default from FIFO to high-cost lot, then override with specific identification whenever a trade calls for something different. High-cost lot minimizes gains on routine sales automatically; specific identification lets you target a particular lot for loss harvesting or long-term gain treatment when the stakes justify the extra step.
For mutual funds with frequent reinvested dividends, average cost keeps the bookkeeping manageable, but commit to it only if you’re confident you won’t need to sell individual lots strategically. If there’s any chance you’ll want that flexibility later, choose specific identification before your first sale from the fund.
Whatever method you use, check for wash sale exposure before executing any loss-harvesting trade. The 61-day window catches more investors than any other cost basis mistake, and the lot you carefully selected is worth nothing if the loss it generated gets disallowed.