HIFO Tax Lot Accounting

Highest-in/first-out (HIFO) tax lot accounting is a specific form of inventory accounting allowed by most tax authorities. When an investor makes a partial sale and has acquired the stock on different dates, each at a different cost basis, the investor can select which tax lots are applied to the sale. In that case, the investor should choose the tax lots that will produce the lowest tax bill.

HIFO Tax Lot Accounting

On this page, we discuss the Highest-in/first-out (HIFO) and lowest-in/first-out method to tax lot accounting. We also discuss a simple numerical example that illustrates the advantages of both approaches.

Highest-in/first-out (HIFO)

Highest-in/first-out is generally the best approach to use. In this case, the shares with the highest cost basis will be designated as sold.

  • If the sale price is higher than cost basis, this will minimize the gain and capital gains taxes due now.
  • If the sale price is less than the cost basis, this will maximize the realised loss and immediate tax benefits.

Lowest/in/first-out (LIFO)

In a special case where future tax rates are expected to be higher than current tax rates, lowest-in/first-out may be better and the shares with the lowest cost basis should be sold first. This will create a higher immediate tax bill, but it defers the higher tax lots for sale in the future. That should lower the realized gain or increase the realized loss at a future date when tax rates are higher.

In other words, LIFO reduces the realised gain or maximizes the loss until a period of higher rates and greater tax benefit.

Numerical example

Imagine we have an investor who bought 300 shares in total. In particular, she bought the shares in equal amounts with the following cost bases:

  • 100 @ $10,000
  • 100 @ $12,000
  • 100 @ $15,000

In the case she expects higher taxes in the future, LIFO would be most favorable and she would select the 100 stocks bought for $10,000. In most cases, however, HIFO is most appropriate, in which case she would opt for the 100 shares bought for $15,000.


We discussed two tax lot accounting methods that an investor can use to reduce capital gains taxes and maximize realised losses.