DocsFundStat

GETTING STARTED

IntroductionAccountsAdding TransactionsWalletsView SwitcherMobile AppAI Assistants (MCP)FAQ

INSTRUMENTS & EVENTS

Supported InstrumentsCustom SymbolsFutures ContractsCorporate ActionsShare Transfers

HOW WE CALCULATE

CalculationsCurrency ConversionPIT-38 and tax optimizer

TRANSACTIONS IMPORT

Alior BankBossaDegiroErsteeToroExanteFreedom 24INGInteractive BrokersmBank (eMakler)mBank (mInwestor)MyFund - MigrationPekaoPKO BPPKO BP (Treasury Bonds)RevolutSaxo BankTrade RepublicTrading 212Universal ImportXTB

PRODUCT UPDATES

2026-112026-102026-092026-082026-072026-06
Login
Contact

On this page

Where to find itWhat the estimate coversHow we calculateLosses from previous yearsAmounts for the returnTax optimizerDifferences from PIT-8CWarnings in the estimateNeed Help?
Calculations

PIT-38 and tax optimizer

How FundStat prepares the preliminary PIT-38 estimate and how the tax optimizer simulates selling open positions before the year ends.

A preliminary estimate, not tax advice

The calculations are informational only. They are not tax advice or a ready-made return, and FundStat does not file returns on your behalf. Before filing PIT-38, compare the amounts with the PIT-8C forms from your brokers, and consult a tax advisor if in doubt. The first time you open PIT-38 or the tax optimizer, you confirm that you understand these rules.

Where to find it

  • PIT-38 is a page in the sidebar. For each tax year it shows the income or loss from selling securities and derivatives, the tax on foreign dividends and interest, the amounts to copy into the return, and charts of income and tax over the years.
  • The tax optimizer is in the Tools menu. It simulates how selling chosen open positions by the end of the year would change this year's capital gains tax.
  • Both pages always calculate in Polish zloty, whatever view and portfolio currency you have selected.
  • At the top of the page you choose which accounts to settle, for example only one person's accounts if you also track someone else's portfolio in FundStat.
  • From November, the PIT-38 page shows the days left in the year and points to the optimizer, because until December 31 you can still change this year's tax.

What the estimate covers

Included
  • Capital gains (art. 30b): selling shares, ETFs, bonds and other securities, and closing derivatives such as futures and CFDs.
  • Foreign dividends and interest (art. 30a), less the tax withheld abroad within the allowed limit.
Left out
  • Cryptocurrencies. They go in a separate part of PIT-38 (parts E and F), with different rules for costs.
  • IKE and IKZE accounts, which are exempt from capital gains tax. On the PIT-38 page they start unselected; select them to see how much the exemption saves.
  • Tax reliefs, deductions and your individual tax situation.

Income taxed by a payer, such as Polish dividends and interest from Polish brokers and retail treasury bonds, is shown for checking only. The payer settles it, so it does not go into PIT-38. A difference above zero means too little tax was withheld or data on the withheld tax is missing.

How we calculate

  • The purchase cost uses FIFO: the oldest purchases are sold first. FIFO runs separately for each account, as it does within a securities account. If your broker let you pick which purchase an order sold, link the sell to that purchase in its transaction details and FundStat uses it instead of FIFO.
  • Costs are the purchase cost of the units sold plus the commissions on buying and selling them. They count in the year of the sale, not the purchase.
  • Foreign currency amounts are converted at the NBP average rate (table A) from the last business day before the day the income arises or the cost is incurred, separately for the purchase and the sale. For exchange-listed shares, ETFs and bonds that is the day the trade settles; for other instruments it is the trade date. A commission is converted like the trade it was charged on. When NBP publishes no rate for a currency, we use the previous day's market closing rate, which may differ from the rate the law requires.
  • Settlement date. Ownership of exchange-listed shares, ETFs and bonds passes to the buyer when the trade settles, so that is when sale income and purchase cost arise. Brokers prepare PIT-8C the same way, for example XTB (how XTB converts income and costs to PLN, in Polish). We always derive the settlement date from the trade date, whatever the broker: we add the exchange's settlement cycle (T+n) in business days, skipping weekends and settlement holidays. Cycles: in the US, T+1 from 28 May 2024 (in Canada from 27 May 2024), T+2 before that and T+3 before 5 September 2017; on the Warsaw Stock Exchange and other European exchanges, T+2 from 6 October 2014, T+3 before that and T+1 from 11 October 2027. Holidays: days without a session in Warsaw (public holidays, Good Friday, Christmas Eve and New Year's Eve), Federal Reserve holidays in the US, English bank holidays in London and TARGET closing days on other European exchanges. Other exchanges skip weekends only. For example, US shares sold on a Monday settle on Tuesday, so we use Monday's NBP rate; an ETF sold on Xetra on a Monday settles on Wednesday, so we use Tuesday's rate. Futures, crypto and investment fund units have no such cycle, so their trade date counts.
  • Currency conversion fees are not included in costs, because the data does not show which trades they belong to. We list them separately. You can add them if they relate directly to the trades being settled and you have a document showing the amount.
  • A sale of securities counts in the year it settles, together with its purchase cost and commissions. A sale from the last trading days of December that settles in January goes into the next year's return. Futures count in the year the position closes.
  • Futures are settled when a position is closed or expires: from the opening price to the closing price, including commissions. Daily settlements and open positions are not taxed.
  • The tax base and the tax are rounded to whole zloty. The tax rate is 19%.

For each instrument you can expand the sold lots and see the date, price, fees and exchange rate of the purchase and the sale, along with the revenue, costs and result in zloty.

Losses from previous years

A loss from selling securities and derivatives can be deducted from income over the next 5 years.

  • A loss can be deducted once up to 5,000,000 zł (for losses from 2019 onwards), and the rest at most 50% of that loss each year.
  • Losses are deducted oldest first, so the ones that expire sooner are used first.
  • We assume the maximum possible amount was deducted in previous years. If less was deducted, more is left than we show.
  • In a year without income nothing is deducted. The amount carries over to later years, up to 5 years from the year of the loss.
  • Losses come only from transactions in FundStat. A loss from a year with no transactions in the app is not included.
  • The optimizer warns when part of a loss can be deducted only in the current year, because it is lost after the year ends.

Amounts for the return

The For the return section gathers the amounts to copy into PIT-38 and PIT/ZG, numbered like the fields on the form.

  • C.22 and C.23: revenue and tax-deductible costs from selling securities and derivatives.
  • If a Polish broker issued a PIT-8C, enter its amounts in fields C.20 and C.21, and only the remaining part in C.22 and C.23.
  • D.28: losses from previous years.
  • G.45 and G.46: the flat-rate tax on foreign dividends and interest, and the tax paid abroad that can be deducted.
  • PIT/ZG: income and tax paid abroad by the issuer's country. It covers only gains from sales, not dividends, so the total may differ from the income in PIT-38.

For foreign dividends you deduct the tax withheld abroad, but no more than the rate in the double taxation treaty; for interest, no more than 19%. Any excess can only be reclaimed in the source country. When we do not know the treaty rate for a country, we apply a default rate and flag it for you to check.

Tax optimizer

The optimizer shows this year's capital gains tax and lets you check how selling open positions would change it. It is mostly used to sell losing positions to lower the tax on gains realized this year, or to realize gains that a loss will offset.

  • The chart at the top shows how the tax builds up: the realized result, the selected sales, losses from previous years, the tax base and the 19% tax, along with the change compared to selling nothing.
  • Open positions are split into losses and gains, separately for each account. Each one shows its value, purchase cost, unrealized result and how the tax would change if you sold it.
  • A selected position is sold in full. To sell part of it, expand the details and set the quantity. The oldest purchases are then sold first (FIFO). You can also tick single purchases or enter how much of each you sell.
  • You can also pick single purchases, or enter how many units of each purchase you sell, in any account; the tax then follows the purchases you chose. Do this only if your broker lets a sale name the purchase it sells (XTB does, in its mobile app), because the PIT-8C follows the broker's settlement. After selling, link the sale to those purchases in its transaction details so FundStat settles it the same way.
  • An open futures contract is counted as if it were closed at today's price, with its result from opening to closing. When closing part of a position, the oldest contracts are closed first.
Simulation assumptions
  • Sales are valued at today's prices and today's market exchange rate. In the return you will use the NBP rate from the business day before the sale settles, so the result may differ slightly.
  • Purchase costs and this year's results use the NBP rate from the business day before each trade settles, as on the PIT-38 page.
  • Sale commissions are not included.
  • Covers securities and futures in taxable accounts. Cryptocurrencies, CFDs, retail treasury bonds (taxed by the payer) and IKE and IKZE accounts are left out. Dividend tax cannot be reduced by a loss on sales.
  • A sale counts in the year it settles: one business day after the trade in the US (T+1), two business days after it on the Warsaw Stock Exchange and European exchanges (T+2). A sale from the last trading days of December therefore goes into the next year. The optimizer shows the last day a sale still counts in the current year.

Differences from PIT-8C

Your broker's PIT-8C is the reference. The most common reasons the FundStat estimate differs from it:

  • Missing, duplicated or wrong transactions, fees and taxes. The estimate is based only on the data imported or entered in FundStat.
  • Missing purchase history. A sale without a known purchase cost is skipped, for example when shares were bought before the imported period or transferred from another broker.
  • Currency conversion fees. The broker may have included them in costs, while FundStat lists them separately.
  • Settlement date. We derive it from the trade date and the exchange's standard cycle. If your broker settled a trade on another day, for example because the market closed unexpectedly, the NBP rate or the tax year may differ.
  • Choosing a purchase. If your broker let you name the purchase you sold (XTB does), the PIT-8C follows that choice, while FundStat settles an imported sale with FIFO until you link it to its purchases in the transaction details.
  • Exchange rate. When NBP publishes no rate for a currency, we use the market rate.

Warnings in the estimate

When part of the data is missing, the PIT-38 page shows a warning instead of silently understating or overstating the result:

  • Sales without purchase history are skipped, and the page shows how many there are. The optimizer then warns that the result and tax are incomplete.
  • Futures closes without a settlement price at expiry are skipped.
  • Tax withheld abroad that could not be matched to a specific dividend or interest payment is not deducted.
  • A tax refund that could not be matched to a payment does not reduce the deduction.
  • When exchange rates are missing, the estimate cannot be calculated.

Adding the missing transactions usually helps: purchases from before the import, share transfers from another broker, or withheld taxes.

Need Help?

Signed in to FundStat? Ask the AI assistant in the app. It knows the FundStat docs and can look at your accounts and transactions to answer right away.

Ask the AI assistant in FundStat

Still stuck? Reach out to us. Our Discord server is FundStat’s main support channel, including help with individual cases, and usually the fastest way to get a reply.

Join FundStat on Discord

You can also email us at contact@fundstat.pl.