PIT How to
How to Calculate Average Purchase Price for PIT-38

How to Calculate Average Purchase Price for PIT-38

2024-01-15

🧾 Introduction

If you buy the same stock or ETF in multiple transactions at different prices, you must calculate the average purchase cost when you later sell.

This rule ensures that the taxable profit in your PIT-38 is accurate and based on actual investment costs.


💡 Why Average Price Matters

When you sell part or all of your holdings, you cannot choose which units were sold. Polish tax law follows the FIFO (First In, First Out) principle — meaning the first assets you bought are the first you sold.

To simplify, you can calculate the average cost per unit, which combines all your purchase prices and commissions into one value.


🧮 Example: Multiple ETF Purchases

DateUnitsPrice per Unit (EUR)Total (EUR)
1 Jan 202410€100€1,000
1 Mar 20245€120€600
1 May 20245€110€550

Total units = 20
Total cost = €1,000 + €600 + €550 = €2,150

Average price = 2,150 / 20 = €107.50 per unit

If you sell 10 units later at €115 each:
Profit per unit = 115 − 107.5 = €7.5
Total profit = €75 (before conversion to PLN).


💱 Convert to PLN Using NBP Rates

Each purchase and sale must be converted to PLN using the NBP average rate from the day before the transaction.

If you bought in EUR and sold in EUR, use the correct rates for each date. Example:

DateEventRateAmount (EUR)PLN
1 Jan 2024Purchase4.40€1,0004,400
1 Mar 2024Purchase4.45€6002,670
1 May 2024Purchase4.50€5502,475
1 Sep 2024Sale4.60€1,1505,290

📄 How to Declare in PIT-38

FieldDescriptionPLN
22Income (from sale)5,290
23Costs (total from purchases)9,545
26Loss or Profitdepends on totals

Attach the correct PLN conversions and keep your trade statements as evidence.


⚠️ Tips for Investors

  • Keep a spreadsheet of all purchases with NBP rates.
  • Remember FIFO order if you sell only part of your holdings.
  • Include all commissions in your average cost.
  • Never use a single "average" exchange rate for all transactions.

By calculating average purchase cost correctly, you can avoid errors in your PIT-38 and ensure you pay only the necessary tax.