On this page
Tax Lot Methods: FIFO, HIFO, and Specific ID
When you sell part of a stock position built over several purchases, the shares you choose to sell determine your realized gain or loss. Tax lot accounting is the set of rules for picking which shares are sold, and your method choice can change your tax bill substantially.
Key Takeaways
- A tax lot is a block of shares from a single purchase; the lot you assign to a sale controls both the dollar gain and whether it is short-term or long-term.
- Choosing HIFO (highest cost first) versus the FIFO default can shift thousands of dollars of reported capital gain on an identical sale transaction.
- The most common mistake is accepting the broker's default method without checking, most brokers default to FIFO for stocks, which often produces the largest gain.
- Lot selection affects holding period, not just cost basis: selling a newer lot can accidentally convert a long-term gain into a short-term gain taxed at ordinary rates.
Key Takeaways
- A tax lot is a block of shares from a single purchase; the lot you assign to a sale controls both the dollar gain and whether it is short-term or long-term.
- Choosing HIFO (highest cost first) versus the FIFO default can shift thousands of dollars of reported capital gain on an identical sale transaction.
- The most common mistake is accepting the broker's default method without checking, most brokers default to FIFO for stocks, which often produces the largest gain.
- Lot selection affects holding period, not just cost basis: selling a newer lot can accidentally convert a long-term gain into a short-term gain taxed at ordinary rates.
What It Is
A tax lot is a group of shares acquired in a single transaction at a single price and date. If you bought 100 shares of ABC in January at $50 and another 100 shares in June at $70, you own two lots with different cost bases and different holding period start dates.
When you later sell 50 shares, the IRS requires you to identify which shares those came from. The method you pick controls your reported gain or loss and whether the result is short-term or long-term. IRS Publication 550 and the cost basis reporting regulations effective since 2011 for stocks and 2012 for mutual funds govern the rules.
The Intuition
If every share came from the same purchase, accounting would be trivial. Because investors typically accumulate positions across many buys, the same sale transaction can produce very different tax outcomes depending on which lots you assign to it. Choosing high-basis lots reduces the reported gain. Choosing long-held lots can convert a gain from short-term into long-term, where preferential rates apply.
The US tax code acknowledges this flexibility and allows specific identification, provided you tell your broker which lots to sell at or before settlement. If you stay silent, the default rule takes over, which is usually FIFO for stocks.
How It Works
Four common methods show up in broker platforms:
- FIFO (First-In, First-Out). The oldest lots are sold first. This is the IRS default when you do not specify. FIFO tends to realize long-term gains in a rising market because the oldest shares often have the lowest basis.
- LIFO (Last-In, First-Out). The newest lots are sold first. LIFO usually realizes short-term gains or smaller long-term gains in a rising market. LIFO is available for securities but not for every asset class.
- HIFO (Highest-Cost, First-Out). The lot with the highest basis is sold first, which minimizes the current gain or maximizes the current loss. Some brokers expose this as "tax lot optimizer" or "minimum tax."
- Specific Identification. You pick the exact lot at trade entry or settlement. This gives the most control and is generally the most tax-efficient, though it requires active management.
realized gain = sale proceeds - selected lot basis
holding period = sale date - selected lot acquisition date
For mutual funds, an additional method called average cost is allowed. It divides total dollars invested by total shares held. Once elected, average cost generally must be used consistently for that holding.
Brokers report cost basis to the IRS on Form 1099-B for "covered" securities acquired after the reporting start dates. Pre-2011 share purchases are "non-covered" and you carry the recordkeeping burden yourself.
Worked Example
Suppose you own three lots of ABC:
- Lot A: 100 shares bought January 2022 at $30 per share
- Lot B: 100 shares bought March 2024 at $60 per share
- Lot C: 100 shares bought October 2025 at $90 per share
Current price is $85. You sell 100 shares.
Under FIFO, you sell Lot A for a long-term gain of $5,500 ($85 minus $30 times 100). Under LIFO, you sell Lot C for a short-term loss of $500. Under HIFO, you also sell Lot C for the same $500 short-term loss. Under specific identification, you could instead sell Lot B for a long-term gain of $2,500, which might be preferable if you want to use a long-term loss carryforward to absorb it.
The dollar difference between FIFO and HIFO in this example is $6,000 of reported capital gain, with material tax consequences.
Common Mistakes
-
Accepting the broker default without checking. Most brokers default to FIFO for stocks and average cost for mutual funds. Neither is always optimal. Set your preferred method in account settings before you start trading.
-
Trying to change lot identification after settlement. The IRS requires you to identify the lots sold at or before the settlement date. Once the trade settles, the identification is locked. Brokers will usually refuse to re-designate lots after the fact.
-
Forgetting that lot selection affects holding period. Selling a newer lot can turn what you assumed was a long-term gain into a short-term gain, taxed at ordinary rates. Always check the acquisition date of the lot you select.
-
Average cost election on mutual funds is sticky. Once you elect average cost for a mutual fund position, you generally must continue using it until you fully liquidate the position. Switching requires a formal revocation in writing to the broker.
Frequently Asked Questions
Q: What are tax lot accounting methods in simple terms? When you own shares bought at different times and prices, "tax lot methods" are the rules for deciding which shares you are selling. The choice changes how much gain you report and whether it is taxed at ordinary or preferential rates.
Q: How do tax lot accounting methods affect investment decisions? The right method can defer gains, harvest losses on specific lots, or convert a short-term gain into a long-term one, all without changing your total market exposure. Investors with complex positions check lot selection before every partial sale.
Q: What is a real-world example of tax lot accounting methods? You hold three lots of a stock: 100 shares at $30, 100 at $60, and 100 at $90. Current price is $85. Under FIFO you sell the $30 lot for a $5,500 long-term gain. Under HIFO you sell the $90 lot for a $500 short-term loss. The dollar difference in reported gain is $6,000 on the same transaction.
Q: How can investors use tax lot methods most effectively? Enable specific identification in your brokerage account settings before you start trading, designate the exact lot at or before the settlement date of each partial sale, and check both the cost and the acquisition date to confirm the holding period is what you expect.
Q: How are tax lot methods different from cost basis averaging? Average cost is a single method available only for mutual funds that blends all purchases into one per-share basis. Specific identification, FIFO, and HIFO are lot-by-lot methods available for stocks and ETFs that let you target individual purchase batches. Average cost is stickier, switching away from it requires a formal written revocation to your broker.
Sources
- Internal Revenue Service. "Publication 550 (2025), Investment Income and Expenses." https://www.irs.gov/publications/p550
- Internal Revenue Service. "Stocks (options, splits, traders) FAQ." https://www.irs.gov/faqs/capital-gains-losses-and-sale-of-home/stocks-options-splits-traders/stocks-options-splits-traders-3
- Charles Schwab. "Save on Taxes: Know Your Cost Basis." https://www.schwab.com/learn/story/save-on-taxes-know-your-cost-basis
- Wells Fargo Advisors. "Cost Basis Reporting FAQs." https://www.wellsfargoadvisors.com/planning/goals/tax-center/cost-basis/faqs.htm
Disclaimer
This article is educational content only and is not financial or tax advice. Tax rules vary by jurisdiction and personal situation, and the treatment described here may not apply to you. Consult a licensed CPA or tax attorney before acting on any tax strategy.