What is FIFO?
FIFO (First In, First Out) is an asset disposal valuation method meaning that when selling, shares purchased first are settled first. It is the only method allowed for tax purposes in Poland.
The FIFO method is required by Polish tax law for settling stock market transactions. You cannot choose another method (e.g., LIFO or weighted average).
Note: If you hold shares of the same company purchased in different years, make sure you have imported the full transaction history. Missing earlier purchases will cause calculation errors.
How does FIFO work?
Imagine you buy XYZ company shares in three tranches:
- January: 10 shares at 100 PLN = 1,000 PLN
- March: 10 shares at 120 PLN = 1,200 PLN
- May: 10 shares at 80 PLN = 800 PLN
Then in June you sell 15 shares at 150 PLN. According to the FIFO method, the shares purchased earliest are "used up" first:
- 10 shares from January (cost: 1,000 PLN)
- 5 shares from March (cost: 600 PLN)
- Total cost: 1,600 PLN
- Revenue: 15 × 150 = 2,250 PLN
- Income: 2,250 - 1,600 = 650 PLN
- Tax: 650 × 19% = 123.50 PLN
The remaining 5 shares from March (at 120 PLN) and all 10 shares from May (at 80 PLN) are still in your portfolio. Their acquisition cost will be the basis for calculating tax on future sales.
FIFO calculation examples
Example 1: Simple sale
You bought 20 shares at 50 PLN, then sold all 20 at 70 PLN.
- Acquisition cost: 20 × 50 = 1,000 PLN
- Revenue: 20 × 70 = 1,400 PLN
- Income: 1,400 - 1,000 = 400 PLN
- Tax: 400 × 19% = 76 PLN
Example 2: Multiple purchases
You bought: 10 shares at 100 PLN, 10 shares at 120 PLN, 10 shares at 80 PLN. You sold 25 shares at 150 PLN.
- FIFO: 10 shares (100 PLN) + 10 shares (120 PLN) + 5 shares (80 PLN)
- Cost: 1,000 + 1,200 + 400 = 2,600 PLN
- Revenue: 25 × 150 = 3,750 PLN
- Income: 3,750 - 2,600 = 1,150 PLN
- Tax: 1,150 × 19% = 218.50 PLN
Example 3: Loss
You bought 10 shares at 100 PLN, sold all 10 at 80 PLN.
- Acquisition cost: 1,000 PLN
- Revenue: 800 PLN
- Loss: 800 - 1,000 = -200 PLN
- Tax: 0 PLN (no income)
- The loss can be deducted from income in subsequent years
Partial sale of shares
If you sell only a portion of your shares, FIFO matches the sale to the oldest purchases. The remaining shares stay in your portfolio with their original acquisition cost.
Example:
You have 30 shares (10 at 100 PLN, 10 at 120 PLN, 10 at 80 PLN). You sell 15 shares at 150 PLN.
FIFO matches: 10 shares (100 PLN) + 5 shares (120 PLN) = cost 1,600 PLN.
Remaining shares: 5 shares (120 PLN) + 10 shares (80 PLN) = 1,400 PLN in portfolio.
FIFO for cryptocurrencies
The FIFO method is also mandatory for cryptocurrencies. When selling cryptocurrency, the system automatically matches the sale to the oldest purchases.
Example:
guides.fifo_s5_example_intro
- guides.fifo_s5_buy1
- guides.fifo_s5_buy2
- guides.fifo_s5_buy3
guides.fifo_s5_sell
- guides.fifo_s5_r1
- guides.fifo_s5_r2
- guides.fifo_s5_r3
- guides.fifo_s5_r4
- guides.fifo_s5_r5
FIFO works separately for each cryptocurrency. Bitcoin and Ethereum have separate FIFO queues. You must track the full transaction history from all exchanges.
FIFO matching preview
Our calculator shows detailed matching of buy and sell transactions using the FIFO method. For each sale you will see:
- Which purchases were matched to the sale
- Acquisition cost of matched shares
- Realized profit or loss
- Remaining shares in portfolio
The FIFO matching preview helps you understand how the system calculates tax. You can verify each match and make sure everything is correct.
FAQ
Can I use a method other than FIFO?
No, FIFO is the only method allowed for tax purposes in Poland. You cannot use LIFO, weighted average, or other methods.
Does FIFO work for all instruments?
Yes, FIFO is mandatory for shares, ETFs, cryptocurrencies, and other capital instruments. Each instrument type has a separate FIFO queue.
What if I don't have the full transaction history?
Missing full history may lead to incorrect calculations. Make sure you export history from the first purchase of shares you still hold or sold in the reporting year.
Related articles
Use the calculator with automatic FIFO
Our calculator automatically applies the FIFO method to all transactions. Just import files from your brokers - the system will automatically match purchases to sales and calculate tax.