Tax-lot accounting is the method by which, for securities bought several times, it is determined which specific units were sold. Each purchase forms a lot with its own date and cost basis. On a sale, a decision must be made as to which of those lots are assigned — and the realized gain or loss follows from that assignment.
Why the question arises at all
A position built over time in several tranches consists of units with different cost bases. Selling only part of it does not itself make clear which units those were — physically they are indistinguishable. The assignment is therefore a computational convention, and depending on the convention chosen the reported realized gain differs, although the economic event is identical.
The common methods
FIFO, first in first out, assigns the oldest lots first. In rising markets that tends to produce the highest reported gain, because the cheapest cost bases are consumed first. LIFO, last in first out, reverses this and assigns the most recent lots first. HIFO, highest in first out, assigns the most expensive lots first and therefore tends to minimise the reported gain. The average method forms a weighted average cost across all lots and makes the assignment moot.
A worked illustration
Suppose a position was built in three tranches at different prices and half is sold. Under FIFO the oldest and, in a rising market, cheapest units are assigned, reporting a high gain. Under HIFO the most expensive are assigned, suppressing the gain. Under the average method the result sits between them. All three figures are arithmetically correct — they answer the same question under different conventions.
Why consistency matters more than the choice
Because the method influences the result, applying it consistently is decisive. Switching method from sale to sale produces a series of figures that is neither comparable nor traceable. Which method is permitted or prescribed depends on jurisdiction, asset type and context — tax questions on this belong settled with your tax adviser rather than inferred from software. What a system can deliver is consistent application of the chosen method and its traceability.
Where it gets difficult in practice
The calculation is complicated by corporate actions such as splits, mergers or spin-offs that alter or divide lots, and by custody transfers, where original cost bases must be carried across. With foreign-currency positions there is the added point that the gain arises both from the security’s price movement and from the currency movement. Tracking such cases in a spreadsheet typically loses traceability after a few years.
Practical consequence
For a practice reporting across several mandates, three things follow. First, the method belongs fixed and documented per mandate. Second, the calculation must arise from the actual trades rather than from a side computation, because only then do corporate actions and transfers feed in correctly. Third, tax conclusions belong agreed with your tax adviser — the calculation supplies the basis, not the assessment.
