FIFO Cost Basis Explained: How Sales Are Matched to Purchases in Europe
FIFO (first in, first out) means that when you sell part of a holding, the shares you bought first are treated as sold first. Their purchase price is your cost basis. Poland and Hungary require FIFO and Slovakia uses it too; Czechia allows FIFO or a weighted average; Italy uses LIFO for shares and a weighted average for fund units.
BrokerTax editorial team
Based on each country’s tax law · sources at the end
- FIFO matches each sale with the oldest purchase not yet sold.
- Poland requires FIFO, separately for each securities account (art. 24(10) of the PIT Act).
- Czechia allows FIFO or a weighted average; you cannot switch method for the same security within a year.
- Italy uses LIFO for shares (art. 67(1-bis) TUIR) and a weighted average for ETF and fund units.
- Fees on purchase and sale belong to the cost of the trade and lower the gain.
How FIFO works
Every purchase is a separate lot with its date, quantity and price. When you sell, FIFO takes shares from the oldest lot first, then the next one. The gain is the sale price minus the cost of exactly the shares taken.
The date of each lot also decides holding-period exemptions: in Czechia (3 years) and Slovakia (1 year) a sale can be partly exempt and partly taxable.
Worked example
You buy 10 shares at 100 in January and 10 at 150 in March. In November you sell 15 at 160 (proceeds 2,400).
| Method | Cost of the 15 shares sold | Gain | Where it is used |
|---|---|---|---|
| FIFO | 10 × 100 + 5 × 150 = 1,750 | 650 | Poland, Slovakia, Hungary; Czechia (option) |
| Weighted average | 15 × 125 = 1,875 | 525 | Czechia (option); Italy for fund units |
| LIFO | 10 × 150 + 5 × 100 = 2,000 | 400 | Italy for shares |
Which method each country requires
- Czechia: FIFO or weighted average; the method chosen for a security stays for the whole year (guide).
- Poland: FIFO, separately for each securities account; conversion at the NBP rate from the working day before each trade (guide).
- Slovakia: FIFO (guide).
- Hungary: FIFO, with conversion at the MNB rate (guide).
- Italy: LIFO for shares, weighted average cost for ETF and fund units (guide).
Currency and fees
Convert the purchase at the rate for the purchase date and the sale at the rate for the sale date (Czechia also allows one annual uniform rate). The exchange-rate change is part of your gain or loss.
Broker fees and currency conversion fees for a trade are part of its cost: add purchase fees to the cost, subtract sale fees from the proceeds.
What BrokerTax does
BrokerTax applies the method of the country you choose – FIFO for Czechia, Poland, Slovakia and Hungary, LIFO for Italian shares – to the trades from all your brokers, converts each one at the official rate for its date and calculates with exact decimal arithmetic.
This guide is general information, not tax advice. Tax rules depend on your country of residence and personal circumstances, and they change. Check the official sources listed below or ask a tax adviser before you file.
Sources
- Czech Income Tax Act No. 586/1992 Coll. (§ 4, § 8, § 10, § 38f), e-Sbírka
- Polish Personal Income Tax Act, consolidated text Dz.U. 2026 poz. 592 (art. 9, 11a, 24, 30a, 30b), ELI
- Slovak Income Tax Act No. 595/2003 Coll. (§ 8, § 9, § 45), Slov-Lex
- Hungarian Personal Income Tax Act CXVII of 1995 (§ 8, § 66, § 67/A), Nemzeti Jogszabálytár
- Italian TUIR, D.P.R. 917/1986 (art. 44, 67, 68), Normattiva
Stop wrestling with broker spreadsheets and multi-currency exchange rates
Drop your statement CSVs or PDFs into BrokerTax. Get audit-ready capital gains summaries, FIFO lots, and foreign dividend withholdings in seconds.
Frequently Asked Questions
?What does FIFO cost basis mean?
The cost of shares you sell is the price of your oldest unsold purchases. First in, first out.
?Can I choose which shares I sell?
Not for tax purposes in Poland, Hungary or Italy: the law sets the method. In Czechia you choose between FIFO and weighted average, but not lot by lot.
?My broker uses a different method. What now?
Recalculate with your country’s method. Brokers’ realised profit figures often use their own matching and the account currency.
?Does FIFO apply across brokers?
In Poland FIFO is applied separately for each securities account. Elsewhere, check your local guide.