Cost basis and tax lots: FIFO, average cost and why the method matters
Cost basis is what a holding cost to acquire: the price paid plus, where the rules allow, the costs of the purchase. Each purchase of the same shares is a lot, and the rules of the investor's country decide which lots a sale uses up. This guide explains the common methods and why the choice changes both the realised gain and the date from which shares count as held long enough. It is general information, not tax advice.
Updated 20.10.2026
What cost basis is
Cost basis is the amount at which shares are recorded when acquired: the price per share times the number of shares, plus costs such as a commission where the country's rules allow. A realised gain or loss is what a sale brings in minus the cost basis of the shares it is matched to. Cost basis changes with purchases, sales and corporate actions, not with the price.
What a tax lot is
A lot is one purchase: a date, a number of shares and a price. Shares of one company acquired on three days are three lots, each with its own cost and date. Which lot counts only matters once part of the holding is sold: which purchase did the shares that left come from?
Three common methods
First in, first out (FIFO): a sale uses up the oldest lot first. The shares that remain are the most recent purchases.
Average cost: all shares of one security form a pool with one average cost per share, and every sale takes that average. A new purchase changes the average; a sale does not.
Specific identification: the investor names the lots a sale comes from. Where it is allowed, the choice usually has to be made and recorded at the time of the sale, often with the broker.
Who decides the method
Which method applies is set by the rules of the country where the investor is tax resident. Some countries prescribe one method; others allow a choice within their rules, made by an election or, where none is made, by the broker's default; some add special matching rules, for example for shares acquired again soon after a sale. A broker's default is not always the method the country requires.
Why the method changes the gain and the date
Take three purchases at rising prices and a later partial sale. Under first in, first out the sale is matched to the oldest, cheapest lot, so the realised gain is larger; under average cost it is matched to the average, so it is smaller. Once every share is sold, the gains add up to the same total; only their timing differs.
The method also moves dates. Where a gain becomes tax-free after a holding period, the period runs per lot from its purchase date. Under first in, first out a partial sale removes the oldest lots, so the shares left are younger and reach the end of the period later. A country that combines average cost with a holding period also says which purchase dates a sale uses up.
Splits and other corporate actions
A split multiplies the number of shares and divides the cost per share by the same ratio: the total cost of each lot is unchanged, and its purchase date is normally carried over.
Mergers, spin-offs and dividends paid in shares are harder: cost can be divided between old and new shares or move to another company's shares, as the country's rules and the terms of the deal say. These events are where a tracker and a broker most often disagree.
Cost in a foreign currency
Shares bought in a foreign currency have a cost in that currency and, at the exchange rate of the purchase date, a cost in the home currency. A gain in the home currency includes the move of the exchange rate as well as of the price, so the two gains can differ, even in direction. In which currency the gain is counted, which exchange rate applies and from which day all differ by country.
How Allocaria uses lots and dates
When a broker's history is imported, each purchase is recorded as a lot with its date, quantity and price, and sales are matched to the oldest open lots first. A split in an Interactive Brokers statement adjusts the open lots and keeps their dates; a merger or a spin-off is flagged for review, never guessed. Other broker files leave such rows out and list the reason.
Under the holdings, a table of tax-free dates has one row per stock. By the country of tax residence chosen in the settings, it gives the day from which the stock's lots pass that country's holding period and how many days are left; when only some lots have passed, it says how many. Where no holding period makes a gain tax-free, it says so instead of a date. The lots themselves are not listed one by one.
No tax amounts are calculated: no taxable gain, no tax, no document for a return. Where a country matches lots differently, its dates can differ from these. This is general information, not tax advice.
Common questions
First in, first out matches a sale to the oldest purchases; average cost matches it to the average price of all the shares. The realised gain of a partial sale and the purchase dates that remain differ between the two.
The rules of the country where the investor is tax resident. Where those rules allow a choice, an election or the broker's default can decide within them; a broker's default is not always the method the country requires.
Normally not: a split changes the number of shares and the cost per share, and the purchase date of each lot is carried over.
No. It records each purchase as a lot and shows, for each holding, an informational tax-free date by country of residence and, when only some of its lots have passed the holding period, how many. No tax amounts are calculated.
In Allocaria
The rest lives in your own account: see it next to your own holdings.
Request accessClosed beta · by invitation
General information, not investment, tax or legal advice, and not a recommendation about any security. Allocaria is a decision-support tool; it places no orders and holds no money.