LIFO vs. FIFO in Stock Trading

Deciding which shares of stock to sell is often influenced by the sale's tax implications.

Deciding which shares of stock to sell is often influenced by the sale's tax implications.

LIFO and FIFO are terms used when selling stock. In a non-retirement account, the sale of investments may result in tax implications. If you bought stock in the same company over a period of time, price fluctuations will affect your profit or loss when you decide to sell. Using the terms LIFO and FIFO, you can instruct your stockbroker which shares you want to sell: the last stocks you purchased -- LIFO -- or the first stocks you purchased -- FIFO.

Making the Decision

The tax consequence of the sale of investments should be considered before the actual sale. For instance, the value of the investment might have increased significantly since you first bought it. While you would like to sell stock to have the cash, selling the first shares purchased -- FIFO -- could incur a large capital gain and the associated taxes. By selling the most recently purchased shares -- LIFO -- which have a cost basis closer the selling price, you are keeping your capital gains to a minimum.

Cost Basis

Cost basis is the price you pay for a company’s stock, plus dividends earned that were reinvested. Dividends that were not reinvested but instead taken in cash -- whether paid to you directly or moved into another form of savings -- are not considered when calculating the original stock's cost basis. When an investment is sold, the stock’s cost basis is used to determine if there is a taxable capital gain or a taxable capital loss.


LIFO stands for last-in, first-out. When stock is sold, the cost associated with the last shares purchased is considered the cost basis. This includes the cost of the shares plus any fees you may have incurred making the purchase. FIFO stands for first-in, first-out. When applied to investment sales, the expenses -- cost basis -- associated with the first stock purchased are used to determine tax liability. This expense includes the price of stock and any fees you may have incurred to make the purchase.

Importance of Specifying Method

The Internal Revenue Service automatically assumes stock is sold on a first-in, first out (FIFO) method. If this is the method you want to use, and it is the method normally used by your brokerage firm, you do not need to do anything other than give your broker instructions to sell. If you want to sell shares in an order other than FIFO, you must provide your broker with specific written instructions, detailing the actual shares you want sold by, for instance, listing the date of purchase. Additionally, you should request a written confirmation from your broker detailing the sale and that your instructions were followed. The brokerage firm will report the sale to the IRS and you will receive a 1099-B, detailing the proceeds from the sale and the cost basis used, for you to use in filing your tax return.

Photo Credits

  • Comstock/Comstock/Getty Images