Who this page is for
Three audiences, one tool.
If you’re an investor optimizing tax outcomes — picking the right method per holding to control your current-year gain. Or comparing methods before you sell — running FIFO, LIFO, and SpecID side-by-side to see the dollar delta. Or recovering history a broker can’t produce — old lots, ACAT transfers, gifts and inheritances, manual entries — this page is for you. If you’re still learning the concepts, start with the FIFO/LIFO guide.
Why method choice matters: four failure modes
For users who already grasp the theory, the practical problem isn’t “what is FIFO?” — it’s that real portfolios don’t let you cleanly use any single method. Four things go wrong:
Brokers force one method per account
Schwab applies FIFO (or your account-wide elected method) to every sell across every ticker. You can’t use FIFO on AAPL and LIFO on NVDA without manual lot specification at every order entry.
No side-by-side preview before you sell
Your broker shows you one method’s answer, after the fact. You can’t see “FIFO would cost $21K, SpecID would cost $13.8K” before placing the trade. The $7,200 swing is invisible until it’s realized.
Lots disappear across broker transfers
ACAT transfers, gifts, and inheritances often arrive with no cost basis or the wrong date. Your broker’s FIFO match consumes the wrong lot — usually labelling a long-term gain as short-term.
Corp actions break the ledger
A 2-for-1 split doubles your share count and halves the price — but only if every lot’s basis is adjusted correctly. Spin-offs, mergers, return-of-capital and options assignments compound the problem.
How it works: import, choose, export
Three steps. Brokers connect read-only via SnapTrade. Manual lot entry available for any history the brokers can’t provide. Method choice flips a dropdown; the lot ledger recomputes deterministically.
Import → Choose method → Export audit trail
Worked example: NVDA under five methods
Same trades, same proceeds, five method choices. This is the calculation a side-by-side preview runs for you before you sell.
Setup: 400 NVDA shares accumulated over 3.5 years
Buying 100 shares at four price points, then selling 200 shares at $1,000 in September 2025. Two of the four lots are long-term (held >12 months); two are short-term. We use illustrative US single-filer rates: 32% ordinary income, 15% long-term capital gains.
Buy history
Four lots, two long-term, two short-term at sell date
| Lot | Date | Qty | Price | Cost | Held | Term |
|---|---|---|---|---|---|---|
| A | 2022-Q1 | 100 | $200 | $20,000 | ~3.5y | LT |
| B | 2023-Q1 | 100 | $400 | $40,000 | ~2.5y | LT |
| C | 2024-11 | 100 | $600 | $60,000 | ~10mo | ST |
| D | 2025-Q1 | 100 | $850 | $85,000 | ~6mo | ST |
| Σ | — | 400 | avg $512.50 | $205,000 | — | mixed |
The sell: 200 shares @ $1,000 on 2025-09 = $200,000 proceeds. The question: which 200 shares are consumed, and what’s the resulting LT/ST split and total tax?
Five methods, five answers
Same trades, same proceeds — total federal tax by method
| Method | Lots consumed | Cost basis | Gain (LT / ST) | Total tax |
|---|---|---|---|---|
| FIFO | A + B | $60,000 | $140K LT / $0 ST | $21,000 |
| LIFO | D + C | $145,000 | $0 LT / $55K ST | $17,600 |
| HIFO (SpecID strategy) | D + C | $145,000 | $0 LT / $55K ST (same as LIFO here) | $17,600 |
| Average Cost¹ | 200 × $512.50 | $102,500 | $97.5K LT / $0 ST | $14,625 |
| SpecID (optimal) | D + B | $125,000 | $60K LT / $15K ST | $13,800 |
¹ Average Cost has a narrow scope. Treas. Reg. §1.1012-1(e)(7)(ii) uses the earliest lots first for holding-period determination under Average Cost — so on a 200-share sale, lots A and B (both LT) anchor the holding period and the entire $97.5K gain is long-term. Critically, the Average Cost method is only available for mutual funds and certain DRIPs (dividend reinvestment plans) — NOT for single stocks, and NOT for crypto (crypto switched to per-wallet basis under Rev. Proc. 2024-28 effective 1 January 2025, so universal-pool averaging no longer applies). We include Average Cost for comparison because users routinely ask “what would Average Cost give me?” even when ineligible.
Headline: $7,200 swing between FIFO and SpecID-optimal
Same trades, same proceeds. FIFO costs $21,000 in tax. SpecID-optimal costs $13,800. Delta: $7,200. Method choice is a tax decision, not just an accounting convention. And notice that HIFO ≠ optimal SpecID once long-term lots are in scope — HIFO consumes the highest-cost (D + C, both ST), but the optimal mix uses D + B to keep $60K in the 15% LT bracket. A side-by-side preview surfaces this before the trade.
Method permission varies by jurisdiction
The US permits FIFO, LIFO, SpecID, and Average Cost (mutual funds/DRIPs only). The UK uses Section 104 pooling with same-day and 30-day matching rules — not FIFO/LIFO. Spain and Germany mandate FIFO; LIFO and SpecID are not available. Italy permits LIFO (26% flat rate on financial gains; LIFO is allowed, not mandated). Australia and Canada permit FIFO or specific identification, with Canada using Average Cost Basis (ACB) including the superficial loss rule. Check your jurisdiction’s rules before relying on a US-style method choice.
Crypto: per-wallet basis from 1 January 2025
Under IRS Rev. Proc. 2024-28, US digital-asset holders must track cost basis per wallet (the universal-pool method is gone). FIFO is the default within each wallet; SpecID must be elected per wallet. AllInvestView tracks lots per wallet when wallets are connected separately, so a sale from one wallet consumes only that wallet’s lots in the chosen method — matching the new requirement.
USD figures shown above — but the underlying mechanic (lot-by-lot matching, method-driven consumption order, holding-period determination) is jurisdiction-agnostic. After you have the consolidated ledger and a method, the next artifact is the filing itself: Schedule D / Form 8949 in the US, or your country’s equivalent.
See your own side-by-side method preview
Connect your brokers, choose a holding, and we’ll show you what FIFO, LIFO, and SpecID each cost on the next sale — before you place it.
How AllInvestView compares
Honest look at the five tools investors actually consider for cost basis tracking. We win on per-holding method switching, side-by-side preview, lot-level audit export, options assignment, and short-sale tracking. Snowball matches us on multi-broker consolidation and multi-currency basis. Brokers, Excel, and ChatGPT have known gaps.
| Capability | AllInvestView | Broker (1099-B) | Excel | Snowball | ChatGPT + Plaid |
|---|---|---|---|---|---|
| Lot-level visibility (every buy → matched sell) | |||||
| Switch method per holding | |||||
| Mixed-method portfolio (FIFO + SpecID side-by-side) | |||||
| Corporate actions on lots (splits, spin-offs, mergers) | |||||
| Options assignment → correct stock lot | |||||
| Short-sale lot tracking (open/cover) | |||||
| Broker transfer-in lots (ACAT, manual) | |||||
| Multi-broker consolidated lots | |||||
| Lot-level audit-trail export (CSV/PDF) | 2 | ||||
| Side-by-side FIFO/LIFO/SpecID preview | |||||
| Multi-currency lot basis with daily FX | |||||
| Read-only — no AI training on your data |
2 Snowball exports portfolio-level performance and tax reports; per-lot audit detail (every buy matched to every sell with the disposing method shown) is weaker than AllInvestView’s lot ledger export.
Honest assessment: Snowball matches us on multi-broker consolidation and multi-currency basis. We win on per-holding method switching, side-by-side preview, lot-level audit export, options assignment, and short-sale tracking. ChatGPT can explain FIFO; Plaid Investments surfaces current holdings, not multi-year matchable lots. Excel can replicate the math — if you keep it perfectly maintained for ten years.
When FIFO isn’t enough: edge cases the ledger has to handle
Plain FIFO works for plain-vanilla buys and sells. Real portfolios have all of these:
Corporate actions
2-for-1 splits, reverse splits, spin-offs, mergers, return-of-capital. Each lot must be adjusted — quantity, basis, and acquisition date preserved — or FIFO matches against the wrong lot.
Short sales
Open a short, cover later. Holding period runs from the cover date, not the open date. Loss/gain classification differs from long positions. The ledger must track open shorts as their own lot type.
Options assignment
A covered call assigned at $X creates a stock disposition with proceeds adjusted for premium received. A cash-secured put assigned creates a new long lot with cost basis reduced by the premium. The lot ledger must absorb both.
Broker transfers (ACAT, manual)
Transferred-in shares often arrive with no basis. You enter the original cost and acquisition date; the FIFO match should consume that lot at the original price, not at the transfer-in price.
Wash sales
A loss within a 30-day window of a re-purchase is disallowed; the disallowed amount is added to the replacement lot’s basis. FIFO/LIFO/SpecID then consume the bumped-basis lot. See the wash sale detection companion page.
Inherited & gifted shares
Inherited: stepped-up basis to date-of-death FMV. Gifted: carryover basis from the donor, with the dual-basis rule for losses. Both are recorded as the lot’s opening cost — FIFO/SpecID works downstream.
For US filers, the next document after the lot ledger is Schedule D / Form 8949. For multi-broker setups, see the multi-broker tax report which consumes this ledger.
Frequently asked questions
It depends on holding period and price trajectory. In a rising market, SpecID, HIFO and LIFO all cut current-year gain by consuming the highest-cost lots first; FIFO defers gain into the future by consuming the cheapest lots. SpecID-optimal goes further by mixing long-term and short-term lots to shift gain into the lowest applicable bracket. In the worked example above, the swing between FIFO ($21,000 tax) and SpecID-optimal ($13,800 tax) on the same 200-share NVDA sale is $7,200. The right method also depends on jurisdiction: the UK uses Section 104 pooling, Spain and Germany mandate FIFO, the US permits FIFO, LIFO, Average Cost (mutual funds and certain DRIPs only) and SpecID.
Yes. AllInvestView sets the method per individual holding. Brokers typically apply one method account-wide; mixing methods at a single broker requires manual lot specification at order entry. A consolidated ledger across every broker lets you choose freely per ticker, run side-by-side previews, and switch methods retroactively for analysis without changing what you reported to the IRS for past tax years — see our full ChatGPT comparison for why a generative model can’t do this deterministically.
Change the dropdown — the lot ledger recomputes. With a broker, you must elect the method before settlement of the sale, with written confirmation. The IRS does not accept retroactive re-specification (Treas. Reg. §1.1012-1(c)). AllInvestView lets you model alternative methods after the fact for analysis, but the reported basis must match the method elected at the time of sale.
Most US brokers — Schwab, Fidelity, Interactive Brokers, E*TRADE, Vanguard — support SpecID at order entry, usually as a “lot selection” or “tax lot” option on the sell ticket. European brokers vary widely: DeGiro and Trading 212 default to FIFO with no SpecID option. AllInvestView reconstructs any method against your full multi-broker history regardless of what the broker stores natively.
Inherited shares receive a stepped-up basis to the fair market value on the date of death (US). Gifted shares use carryover basis from the donor, with a dual-basis rule when sold at a loss (loss-basis is the lower of donor’s basis or FMV at the gift date). Both rules operate upstream of method selection: record the basis as the lot’s opening cost, and FIFO/LIFO/SpecID work downstream the same way.
A 2-for-1 split halves the per-share price and doubles the quantity of each lot, preserving each lot’s total cost basis and original acquisition date. AllInvestView applies splits, spin-offs, mergers, and return-of-capital to every lot automatically — so a sale from a post-split position still maps to the original pre-split lots for holding-period and basis purposes.
A wash sale disallows the realized loss and adds the disallowed amount to the cost basis of the replacement lot — regardless of whether you’re using FIFO, LIFO, or SpecID. The wash-sale ledger feeds the lot ledger upstream: the lot that triggered the wash gets its basis bumped, and that bumped basis is what FIFO/LIFO/SpecID consume on the next sale. AllInvestView checks the 30-day window across every broker you’ve connected, not just within a single account. See the wash sale tracker for the full workflow.
ACAT (in-kind transfer) is supposed to carry the cost basis from one broker to the next, but in practice it’s unreliable for older lots, foreign brokers, gifts, or inheritances — the receiving broker often labels the lots “basis unknown / non-covered.” AllInvestView lets you enter the original lot history manually and reconciles against the receiving broker’s records, so FIFO consumes the correct pre-transfer lot at the correct original cost. See the multi-broker tax report for the cross-broker workflow.
The IRS permits FIFO (the default), LIFO, Average Cost (mutual funds and certain DRIPs only — not single stocks), and Specific Identification. Treas. Reg. §1.1012-1(c) requires adequate identification of the lots specified by settlement date, with broker confirmation. From 1 January 2025, digital assets follow Rev. Proc. 2024-28: per-wallet cost basis is required (the universal-pool method is gone), FIFO is the default per wallet, and SpecID must be elected per wallet. AllInvestView tracks lots per wallet when wallets are connected separately, matching the new requirement. Once you've picked a method, use the realized gains calculator to calculate realized gains for any period across every broker.
Want the concepts first? Read the FIFO/LIFO guide for the underlying theory, holding-period mechanics, and worked examples without the tool framing.