FIFO Cost Basis Method: Gains, Overrides, and Lot Events

The FIFO cost basis method, short for first-in, first-out, assigns the cost of your oldest shares to every sale you make and works forward through your purchase history until the sale is fully accounted for. The IRS treats it as the automatic default whenever you sell shares without telling your broker which specific lot to unload.1Internal Revenue Service. Stocks (Options, Splits, Traders) 3 In a market that has climbed over time, that means you’re always selling your cheapest shares first, which produces the largest possible taxable gain.

How the Method Assigns a Cost Basis

The logic is straightforward. When you sell, the cost basis attached to those shares comes from whatever you bought earliest.

Say you bought 50 shares in 2019 at $40, another 50 in 2021 at $60, and today you sell 70 shares at $80. FIFO matches the sale against the 2019 lot first. The first 50 shares carry a $40 basis, and the remaining 20 pull from the 2021 lot at $60. Your gain works out to 50 × ($80 − $40) = $2,000, plus 20 × ($80 − $60) = $400, for a total taxable gain of $2,400.

If a sale needs more shares than your oldest lot contains, FIFO simply moves to the next-oldest and keeps going. You cannot skip a lot or reach forward for a more favorable one. The chronological sequence is rigid, and it applies separately to each security you hold.

The rule sits in federal tax law and the underlying Treasury Regulations, which require that shares sold without specific identification be charged against the earliest lot purchased.2Office of the Law Revision Counsel. 26 USC 1012 Basis of Property – Cost3eCFR. 26 CFR 1.1012-1 Basis of Property

Why FIFO Usually Means a Larger Gain

Most investments are bought with the expectation that they will appreciate. When they do, FIFO creates a predictable outcome: the shares with the lowest purchase price get sold first, widening the spread between what you paid and what you received. That spread is your taxable gain.

Imagine ten years of steady buying into the same index fund. Your earliest shares might sit at a $50 basis while your most recent purchases sit at $120. Under FIFO, selling any portion of that holding forces you to report gains measured from those $50 shares, even though you also hold shares that would generate far less taxable income if sold instead.

The reverse is possible. In a declining market, where recent purchases cost more than older ones, FIFO produces a smaller gain or a larger loss because the cheaper, older shares still go first. Over long horizons, markets have historically trended upward, which is why FIFO’s bias toward larger taxable gains is the more common experience.

The Long-Term Rate Trade-Off

FIFO has a silver lining. Because it sells your oldest shares first, those shares are more likely to have cleared the one-year holding period that qualifies gains for long-term capital gains treatment. Long-term gains are taxed at preferential rates well below ordinary income rates; short-term gains on assets held a year or less are taxed as ordinary income and can run as high as 37%.4Internal Revenue Service. Topic No. 409, Capital Gains and Losses

For 2026, long-term capital gains fall into three tiers based on taxable income:

  • 0%: single filers up to $49,450; married filing jointly up to $98,900.
  • 15%: single filers above $49,450 up to $545,500; married filing jointly above $98,900 up to $613,700.
  • 20%: taxable income exceeding those upper thresholds.

High-income investors 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.5Internal Revenue Service. Net Investment Income Tax That pushes the top effective federal rate on long-term gains to 23.8%, and short-term gains at the highest ordinary rate can reach 40.8% after the surtax.

Because FIFO reaches for the oldest shares first, it tends to keep sales in long-term territory. Favorable rate treatment partially offsets the larger gain amounts FIFO produces. Whether you come out ahead depends on your cost basis history and your income.

How to Override the Default

You are not locked into FIFO. If you want to choose which lot gets sold, you can use specific identification, but the IRS imposes two requirements. You have to tell your broker which specific shares to sell at the time you place the order, and your broker has to provide written confirmation of that instruction within a reasonable time afterward.3eCFR. 26 CFR 1.1012-1 Basis of Property Most online brokerages handle both steps electronically: you pick the lot on the order screen and the platform issues the confirmation automatically.

Miss that step, and you are stuck with FIFO for that transaction. Many investors trip here. They intend to sell specific lots but never actually select them at order entry, and by the time they notice, the trade has already been reported under FIFO.

Average Cost for Mutual Funds

Mutual fund shares and certain ETFs classified as Regulated Investment Companies qualify for a third option: the average cost method, which divides your total cost across all shares to produce a single per-share basis. It is often simpler for funds with frequent reinvestments. Many brokerages historically defaulted to average cost for mutual funds, though some have shifted to FIFO as the default even for those holdings. You can change the default through your account settings, but the election applies going forward and must be made before the sale.

Situations That Shift Your FIFO Lots

Dividend Reinvestment Plans

Every dividend reinvestment creates a new lot in the FIFO timeline. After years of quarterly reinvestments, you may hold dozens of small lots with slightly different acquisition dates and per-share prices. When you sell, FIFO works through them in order, starting with the oldest reinvestment.1Internal Revenue Service. Stocks (Options, Splits, Traders) 3 If you haven’t kept records of each reinvestment, you’ll need to reconstruct them from brokerage statements or dividend histories.

Stock Splits

A stock split changes the number of shares in each lot and the per-share cost basis, but the total cost basis for the lot stays the same. A 2-for-1 split doubles your shares and halves the per-share basis. FIFO still applies in chronological order after the split; the adjustment is purely mathematical. A reverse split works the same way in the opposite direction.

Inherited Shares

When you inherit stock or other investment property, the cost basis resets to the fair market value on the date of the original owner’s death rather than what they originally paid.6Office of the Law Revision Counsel. 26 US Code 1014 – Basis of Property Acquired From a Decedent This stepped-up basis replaces the decedent’s original cost in the FIFO timeline. If the executor elected alternate valuation, the basis is the value six months after the date of death instead. Either way, the inherited lot enters your FIFO sequence based on the date you acquired it, not when the original owner bought it.

Wash Sales

A wash sale occurs when you sell a security at a loss and buy a substantially identical security within 30 days before or after the sale.7Office of the Law Revision Counsel. 26 US Code 1091 – Loss From Wash Sales of Stock or Securities The loss is disallowed, but it does not vanish. It gets added to the cost basis of the replacement shares.8Internal Revenue Service. Wash Sales Under FIFO, that can produce results you did not expect: if your oldest lot triggers a loss that gets washed because you recently bought more of the same stock, the adjusted basis of the replacement shares may be higher than you assumed, altering later gain calculations.

FIFO and Cryptocurrency

The IRS applies the same FIFO default to cryptocurrency. If you sell, exchange, or otherwise dispose of digital assets without identifying which units are moving, the units are treated as sold in chronological order, oldest first.9Internal Revenue Service. Frequently Asked Questions on Virtual Currency Transactions

Specific identification is available for crypto, but the documentation bar is higher than for stocks. You have to be able to identify each unit by its unique digital identifier, such as a transaction hash, wallet address, or private key, or keep detailed records showing the date, time, cost basis, and fair market value of every unit at both acquisition and disposal.9Internal Revenue Service. Frequently Asked Questions on Virtual Currency Transactions For anyone who traded across multiple wallets and exchanges without meticulous records, FIFO is often the only defensible method.

Starting January 1, 2026, cryptocurrency brokers must report cost basis on digital asset transactions to the IRS, similar to how stock brokerages already report on Form 1099-B.10Internal Revenue Service. Final Regulations and Related IRS Guidance for Reporting by Brokers on Sales and Exchanges of Digital Assets Exchanges will begin tracking and reporting basis using their default method, which for most platforms will be FIFO unless you elect otherwise. If you have preferences about which lots to sell, set your method with the exchange before placing trades.

Records, Reporting, and Penalties

FIFO calculations require a complete purchase history for every lot of every security: acquisition date, number of shares, price per share, and any fees or commissions. That total, including fees, is the cost basis for the lot.1Internal Revenue Service. Stocks (Options, Splits, Traders) 3

Most brokerages now track cost basis digitally and report it to the IRS on Form 1099-B for “covered securities,” which includes virtually all stock purchased after 2010 and mutual fund shares acquired after 2011.11Internal Revenue Service. Instructions for Form 1099-B (2026) For older holdings or securities transferred between brokers, the basis may not be on file, and the burden of reconstructing it falls on you. The IRS recommends keeping property records until the statute of limitations expires for the year of sale, generally three years from filing.12Internal Revenue Service. How Long Should I Keep Records In practice, keep the original purchase records for as long as you own the shares plus three more years after selling.

Each sale is reported on Form 8949 with the description, acquisition date, sale date, proceeds, and cost basis. The difference is your gain or loss.13Internal Revenue Service. Instructions for Form 8949 When a single sale draws from multiple FIFO lots, you’ll often need separate lines because the holding period, and therefore the rate, may differ. Totals from Form 8949 flow to Schedule D of your Form 1040. Most tax software imports 1099-B data and populates the forms automatically; discrepancies between what you file and what your broker reported are one of the most common triggers for IRS correspondence.

Underreporting capital gains through incorrect cost basis figures exposes you to the accuracy-related penalty: 20% of the underpayment, doubling to 40% for gross valuation misstatements.14Office of the Law Revision Counsel. 26 USC 6662 Imposition of Accuracy-Related Penalty on Underpayments Interest accrues on top from the original due date of the return. The burden of proving basis rests entirely on the taxpayer, which is why the recordkeeping is worth the effort.12Internal Revenue Service. How Long Should I Keep Records