Tax Lot Relief Methods and How They Affect Your Taxes

Tax lot relief methods are the accounting rules that decide which of your shares get sold first when you place a sell order, and because you likely bought shares at different times and prices, the method you use directly controls your cost basis, the size of your taxable gain or loss, and whether that gain qualifies for lower long-term rates. The IRS treats first-in, first-out as the default when you don’t specify otherwise, but you have several alternatives that can meaningfully reduce your tax bill if you know how each one works.1Internal Revenue Service. Stocks (Options, Splits, Traders) 3

What a Tax Lot Actually Is

Every purchase of a stock, mutual fund, or other security creates a tax lot. The lot records the number of shares, the date you bought them, and the price you paid (including any transaction fees). That price becomes your cost basis under federal tax law.2Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property Cost

When you sell, the difference between your sale price and your cost basis is your capital gain or loss. Buy 100 shares at $40 and sell them at $60, and you have a $2,000 gain. Buy another 100 shares at $55, sell those instead at the same $60, and the gain is only $500. Same stock, same sale price, very different tax outcome. That gap is what tax lot relief methods exist to manage.

First-In, First-Out (FIFO)

FIFO sells your oldest shares first, in the order you acquired them. Shares bought in 2018 go before shares bought in 2023, regardless of what you paid for either batch. If you don’t tell your broker which method to use, FIFO is what the IRS applies by default.1Internal Revenue Service. Stocks (Options, Splits, Traders) 3

In a rising market, FIFO tends to produce larger gains because your oldest shares usually have the lowest cost basis. The upside: those old shares have almost certainly been held for more than a year, so any gain qualifies for the lower long-term capital gains rates. FIFO suits investors who want simplicity and are willing to accept a larger gain in exchange for favorable rate treatment.

Last-In, First-Out (LIFO)

LIFO flips the order. Your most recently purchased shares are the first ones sold. Buy shares in January and again in June, and a July sell order pulls from the June lot first. If that lot doesn’t cover the order, the system moves backward through your purchase history until it’s filled.

LIFO helps when prices have been falling. Recent shares often have a higher cost basis than older ones, so selling them first produces a smaller gain or even a loss. The catch: those recent shares may have been held for less than a year, which pushes any gain into short-term territory and your ordinary income rate.

Highest-In, First-Out (HIFO)

HIFO ignores dates entirely and sells the shares with the highest cost basis first. Bought lots at $30, $45, and $60? HIFO sells the $60 lot first regardless of when you acquired it. The goal is straightforward: maximize your cost basis on each sale to shrink the taxable gain.

This is the method most commonly associated with tax-loss harvesting. When the market drops and some of your lots go underwater, HIFO makes sure those high-basis, loss-producing lots get sold first, and you can then use those losses to offset gains elsewhere. As with LIFO, though, HIFO doesn’t look at holding period. The highest-cost lot might be one you bought last month, which turns any gain into a short-term one.

Average Cost Method

Average cost blends every share in an account into a single, uniform cost basis. Total dollars spent on all shares divided by total shares owned gives you a per-share basis that applies equally regardless of when the shares were purchased.3Internal Revenue Service. Mutual Funds (Costs, Distributions, Etc.) 1

This method isn’t available for every security. Under federal law, you can use average cost for shares in a mutual fund or other regulated investment company, and for shares acquired after 2011 through a dividend reinvestment plan.2Office of the Law Revision Counsel. 26 USC 1012 – Basis of Property Cost It’s not available for individual stocks held in a standard brokerage account.

Average cost is the most hands-off approach. It works well when you’re making frequent small contributions to a mutual fund and don’t want to track dozens of tiny lots created by automatic reinvestments. You give up the ability to cherry-pick high-basis or low-basis lots for strategic selling.

Specific Share Identification

Specific identification gives you the most control. Instead of following an automatic rule, you tell your broker which specific lot to sell. Maybe you want to sell the lot you bought at $58 to lock in a loss, while keeping the lot you bought at $30 because you’d rather not realize that gain yet.

The IRS has two requirements for “adequate identification.” You must specify the particular shares to your broker at the time of the sale, and you must receive written confirmation from the broker within a reasonable time.4Internal Revenue Service. Publication 550 – Investment Income and Expenses Most online brokerages now let you select specific lots through their trading platform and generate electronic confirmations automatically.

This method requires attention. Don’t specify, and you’re back to FIFO. But for investors willing to do the work, specific identification is the most powerful tool for managing both the size and the character of gains and losses through the year, because it’s the only method that lets you optimize both cost basis and holding period on the same trade.

How Your Method Affects the Tax Rate You Pay

The reason lot selection matters comes down to one distinction in the tax code. A gain on an asset held for one year or less is short-term. A gain on an asset held for more than one year is long-term.5Office of the Law Revision Counsel. 26 USC 1222 – Other Terms Relating to Capital Gains and Losses

Short-term gains are taxed at your ordinary income rate, which for 2026 ranges from 10% to 37% depending on income.6Internal Revenue Service. IRS Releases Tax Inflation Adjustments for Tax Year 2026 Long-term gains get preferential rates of 0%, 15%, or 20%.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses For someone in the 32% bracket, the difference between short-term and long-term treatment on a $10,000 gain is roughly $1,700 in additional tax.

Here’s how that ties back to lot selection. FIFO tends to sell shares held the longest, so gains usually qualify for long-term rates. LIFO and HIFO sell shares that may have been held for less than a year, which can flip gains into short-term territory. Specific identification is the only method that lets you thread the needle by choosing lots that are both high-cost and held long enough for long-term treatment.

Wash Sale Rule

Selling a specific lot at a loss only works as a tax strategy if you avoid the wash sale rule. Under federal law, if you sell shares at a loss and buy substantially identical shares within 30 days before or after that sale, the loss is disallowed.8Office of the Law Revision Counsel. 26 USC 1091 – Loss From Wash Sales of Stock or Securities

The disallowed loss isn’t lost forever. It gets added to the cost basis of the replacement shares, and the original holding period tacks onto the new lot. You recover the benefit when you eventually sell the replacement shares, but you can’t use the loss now.

Dividend reinvestment plans are a common trap. Sell a stock at a loss while your DRIP is automatically reinvesting dividends from that same stock within the 30-day window, and that automatic purchase counts as buying substantially identical shares. Check your reinvestment settings before harvesting a loss.

How Much of a Loss You Can Actually Use

If your lot selection produces net capital losses for the year, there’s a ceiling on how much you can deduct. Individuals can deduct capital losses up to the amount of their capital gains, plus $3,000 against ordinary income ($1,500 if married filing separately).9Office of the Law Revision Counsel. 26 USC 1211 – Limitation on Capital Losses

Losses beyond that limit carry forward to future tax years and don’t expire.7Internal Revenue Service. Topic No. 409, Capital Gains and Losses So generating $20,000 in losses when you only have $5,000 in gains means the extra $12,000 (after the $3,000 ordinary income offset) sits on the books until next year. The losses aren’t wasted, but the cash flow benefit is deferred.

Switching Between Methods

You’re not permanently locked into whichever method you started with, but the rules for switching depend on the method.

The average cost method has a one-year revocation window. You must revoke before the earlier of one year after making the election or the date of your first sale of those shares. Revoke inside that window and your basis reverts to the actual cost of each lot. Miss it, and you can still change methods going forward, but shares already averaged stay averaged. Only shares acquired after the change date get tracked at their actual cost.10Internal Revenue Service. Notice 2011-56

For lot-based methods (FIFO, LIFO, HIFO, specific identification), switching is simpler because the broker tracks each lot individually the whole time. You change your standing instructions with the brokerage, and the new method applies to future sales. Past sales don’t change. Make the change before you place the trade, not after.

Reporting the Sale

Your broker sends you Form 1099-B after year-end, listing proceeds and cost basis for each transaction.11Internal Revenue Service. Instructions for Form 1099-B You then report those transactions on Form 8949 with the date acquired, date sold, proceeds, and cost basis for every sale. Totals carry to Schedule D of Form 1040, where your net capital gain or loss is calculated.12Internal Revenue Service. Instructions for Form 8949 (2025)

The filing deadline is April 15 for most taxpayers. An automatic six-month extension pushes the filing deadline to October 15, but the extension only covers filing, not paying any tax you owe.13Internal Revenue Service. Get an Extension to File Your Tax Return

Choosing the Right Method for You

There’s no universally best method, and the right choice can change from year to year. A few principles hold up across most situations:

  • If you want simplicity, FIFO requires no decisions and no communication with your broker, and it naturally favors long-term holding periods.
  • If you want to minimize gains, HIFO sells the highest-cost lots first. Watch your holding period so you don’t accidentally create short-term gains.
  • If you’re harvesting losses, specific identification lets you target underwater lots while keeping positions you want to hold. Watch the wash sale window.
  • If you hold mutual funds or DRIP shares, average cost is often the default and makes sense when you have many small reinvestment lots that would be tedious to track individually.

Whatever method you pick, make the election with your broker before you sell. Trying to pick a method after the trade has settled is too late, and you’ll be stuck with whatever the broker’s default produces.