Stock-market loss and PIT-38 — why you MUST file a return
YES — always. You must file PIT-38 even when your result for the year is negative; the deadline is 30 April of the following year. The return in which you reported the loss is the basis for deducting it in the following years — without it the tax office may challenge the deduction. Failing to file also risks a penalty. If the deadline has passed, file the overdue return as soon as possible.
How loss deduction works (Art. 9 ust. 3)
The PIT Act (art. 9 ust. 3) allows you to reduce income by a loss from the same source over the next 5 tax years. For investors this means that a loss on shares, ETFs and derivatives can reduce future gains on these instruments. The deduction applies only to the same source of revenue — a stock-market loss will not reduce, for example, income from employment. Since 2019 you have two options:
At once up to 5,000,000 PLN — in one of the next 5 years you deduct the loss up to this amount (art. 9 ust. 3 pkt 2). So you can deduct a loss of up to 5 million PLN in full in a single year.
At most 50% per year — in each of the next 5 years you deduct no more than half of the loss (art. 9 ust. 3 pkt 1). The same 50% limit applies to the part of the loss remaining after the one-off deduction.
The right to deduct expires 5 years after the year in which the loss arose. For example: you can deduct a loss from 2021 in the returns for 2022–2026. Any part not deducted in the return for 2026 is lost for good. That is why it is worth deducting losses as soon as possible — ideally in the first year in which you make a profit.
3 loss deduction scenarios — with real numbers
Below we present three realistic scenarios of deducting stock-market losses, with specific amounts and PIT-38 fields. Each scenario shows a different situation — from the simplest (one loss, one gain) to more complex ones (many years, many brokers). These examples are based on Art. 9 ust. 3 of the PIT Act and take into account the 5 million PLN threshold for a one-off deduction.
Scenario A: Full deduction in one year
Year 2024: The investor sold CD Projekt shares at a loss of 10,000 PLN. They filed PIT-38 for 2024, reporting the loss in field C.29 (loss). Year 2025: Through a foreign broker (without PIT-8C) they sold, for 45,000 PLN, Allegro shares bought for 30,000 PLN — a gain of 15,000 PLN. PIT-38 for 2025: • C.22 (revenue, „Inne przychody” (Other revenue) row): 45,000 PLN • C.23 (costs): 30,000 PLN • C.28 (income, calculated automatically): 15,000 PLN • D.30 (losses from previous years): 10,000 PLN — full deduction, because the loss does not exceed 5 million PLN • D.31 (tax base): 15,000 − 10,000 = 5,000 PLN • D.33 (19% tax): 950 PLN Without the deduction they would pay: 15,000 × 19% = 2,850 PLN Saving: 1,900 PLN
Scenario B: Combining losses from several years
Year 2023: Loss of 8,000 PLN (Biomed-Lublin shares). PIT-38 filed. Year 2024: Loss of 5,000 PLN (iShares MSCI World ETF). PIT-38 filed. Year 2025: Gain of 20,000 PLN on shares of various companies. PIT-38 for 2025: • C.28 (current-year income): 20,000 PLN • D.30 (losses from previous years): 8,000 + 5,000 = 13,000 PLN • D.31 (tax base): 20,000 − 13,000 = 7,000 PLN • D.33 (19% tax): 1,330 PLN Without the deduction: 20,000 × 19% = 3,800 PLN Saving: 2,470 PLN Both losses are within the 5 million PLN limit, so each can be deducted in full at once. The 5 million PLN limit applies to each annual loss separately, and the total deduction in D.30 cannot exceed the income in C.28.
Scenario C: Loss at XTB + gain at Revolut
Year 2025: The investor traded on two platforms at the same time. XTB: Loss of 6,000 PLN on share CFDs. Revolut: Gain of 9,000 PLN on US shares (Apple, Microsoft). In one PIT-38 you COMBINE the results from both brokers: • C.20 / C.21 (revenue from PIT-8C): revenue and costs from the PIT-8C from XTB • C.22 / C.23 (other revenue): revenue and costs from Revolut • Combined income (C.28): 9,000 − 6,000 = 3,000 PLN • D.33 (19% tax): 570 PLN Key rules: • The broker does not matter — what counts is the COMBINED result • A loss with a Polish broker (XTB) is combined with a gain with a foreign broker (Revolut) • CFDs, shares, ETFs, options — everything goes into part C/D (instruments under art. 30b) • The only exception: crypto (part E/F) — NOT combined
Table of PIT-38 fields when reporting a loss
The PIT-38 form contains dozens of fields, but when reporting stock-market losses only 7 of them are key. The table below shows the most important fields you fill in when reporting a loss in the current year and when deducting losses from previous years. The field numbers correspond to the PIT-38 form in force for the 2025 tax return:
| Field | Name | Description |
|---|---|---|
| C.22 | Revenue („Inne przychody” (Other revenue) row) | Revenue from the sale of shares, ETFs, derivatives with brokers that do not issue PIT-8C (e.g. foreign ones) |
| C.23 | Tax-deductible costs („Inne przychody” (Other revenue) row) | Purchase costs of the securities sold + brokerage commissions |
| C.28 | Income | C.26 − C.27 (if the result is positive). Calculated automatically |
| C.29 | Loss | C.27 − C.26 (if costs > revenue). You enter it as a POSITIVE number. Calculated automatically |
| D.30 | Losses from previous years | Loss from the previous 5 years that you deduct from this year's income — no more than C.28 |
| D.31 | Tax base | C.28 − D.30, rounded to full złoty. Calculated automatically |
| D.33 | Tax (19%) | D.31 × 19%. After subtracting the tax paid abroad (D.34) it gives the tax due D.35, rounded to full złoty |
In part C you enter revenue and costs. Transactions with a foreign broker (IBKR, Revolut, DEGIRO, etc.) go in the „Inne przychody” (Other revenue) row (C.22 revenue, C.23 costs). Amounts from the PIT-8C from a Polish broker go into the first row (C.20, C.21) — in e-PIT the tax office fills it in itself. The total fields (C.26 revenue, C.27 costs), income (C.28) and loss (C.29) are calculated automatically. You enter the loss from previous years in field D.30 — no more than the income in C.28. The tax base (D.31) is income minus the deducted loss, rounded to full złoty. The 19% tax on D.31 goes into field D.33. If you paid tax abroad on income under art. 30b ust. 5a/5b, you enter it in D.34, and the tax due (D.35) is D.33 − D.34 rounded to full złoty. If you import transactions from several years into our calculator, the system will calculate and fill in these fields itself — you do not have to carry amounts between years by hand.
Loss with one broker, gain with another
YES — gains and losses from different brokers are combined in a single PIT-38. It does not matter whether you trade with a Polish broker (XTB, mBank eMakler) or a foreign one (IBKR, Revolut, Trading 212, DEGIRO) — in the tax return you add up revenue and costs from ALL sources. A loss at XTB and a gain at Revolut? They add up. A loss at DEGIRO and a gain at Interactive Brokers? Same. The only condition: they must be instruments from the same tax source, i.e. Art. 30b of the PIT Act (shares, ETFs, CFDs, options, futures). The exception is crypto (section E/F) — its losses are NOT combined with losses on shares (section C/D). These are two completely separate tax regimes, described in more detail below.
Crypto — a SEPARATE tax regime for losses!
What if you did not file PIT-38 in a loss year?
Tax-loss harvesting strategy — legal tax optimisation
The calculator takes losses into account automatically
Tracking losses manually across many years and brokers is time-consuming and error-prone. You have to remember the loss amounts for each year, keep track of the 5-year limit and correctly fill in fields D.30 (losses from previous years) and D.31 (tax base). Our calculator does this automatically — import transactions from many years and brokers, and the system will detect losses from previous years and deduct them from your gains. You do not have to dig out old PIT-38 returns or keep a separate spreadsheet.
Our calculator automatically handles multi-year losses. Just import transactions from several tax years (e.g. 2021–2025) — the system will itself detect loss years, calculate the loss amounts and deduct them from gains in the following years (in accordance with art. 9 ust. 3). We support imports from more than 20 brokers, both Polish (XTB, mBank eMakler) and foreign (Interactive Brokers, Revolut, Trading 212, DEGIRO, eToro, Saxo Bank, Freedom24). The calculator combines data from many sources, converts currencies at NBP rates (from the last business day before the settlement date of the transaction, art. 11a ust. 1), applies the mandatory FIFO method to match purchase costs and generates a ready PIT-38 with correctly filled fields D.30 (losses from previous years) and D.31 (base after the deduction). If you have income from sales earned abroad, the system will also prepare the PIT/ZG attachments for each country.
Import from many years and brokers. The calculator will deduct losses automatically.