How to export a report from Interactive Brokers
Interactive Brokers is one of the most popular brokers among investors. The following instructions show how to configure a Flex Query report for stock transactions. For accurate FIFO settlement, import files for ALL years since you started trading — without the full purchase history, the application cannot correctly determine acquisition costs. IB limits each export to 365 days, so generate reports separately for each calendar year.
For Interactive Brokers, the safest workflow is a complete Flex Query that includes trades, dividends, fees, and corporate actions. This gives the calculator enough detail to prepare a Polish PIT-38 filing without rebuilding the report manually in spreadsheets.
- 1Log in to your Interactive Brokers account and open the "Performance & Reports" menu
- 2Navigate to the Flex Queries section
- 3Press the "Create" button to create a new Flex Query
- 4Name the report e.g. "transactions", then in the "Sections" section choose "Trades" and press "Select All" — check all available columns
- 5Scroll down and press "Save"
Tip: Prepare reports for all years back to when you started trading. Make sure dates in consecutive files do not overlap. We recommend exporting by individual calendar years — the same files can be reused for next year's settlement. As an alternative to Flex Query, you can also use the simpler "Performance & Reports → Statements → Transaction History → CSV" export — both formats are recognized.
Does Interactive Brokers issue PIT-8C or do you need Flex Query?
Interactive Brokers does not issue a Polish PIT-8C. The Polish filing is based on Flex Query or Activity Statement exports, which the calculator converts into PIT-38 and PIT-ZG numbers.
This matters especially for Polish expats and investors trading foreign securities, because the report must also cover dividends, withholding tax, and country-by-country reporting for PIT-ZG.
How to file Interactive Brokers in Polish PIT-38
Interactive Brokers is a foreign broker, so Polish tax residents file capital gains in PIT-38 together with the PIT-ZG attachment. This covers stock and ETF sales, foreign dividends, and withholding tax paid abroad.
If you trade across several markets or keep more than one IBKR account, import the full history from every relevant year. That preserves FIFO cost basis and keeps the Polish filing aligned with your real acquisition history.
Frequently asked questions
Do I need to report demo account transactions?
No, demo account (paper trading) transactions are not taxed. Only report transactions from your live account.
How do I settle options and futures from IBKR?
Options and futures are taxed differently than stocks. Options are settled at expiration or when the position is closed. Futures are settled daily (mark-to-market). Consult a tax advisor for complex instruments.
Are IBKR commissions tax-deductible?
Yes, commissions are a tax-deductible expense and reduce taxable income. The calculator automatically includes commissions in the calculations.
What about the dividend tax on Polish companies through IBKR?
If you buy Polish stocks through IBKR, dividends are subject to withholding tax in Poland (19%). You do not need to report them in PIT-38, but you must include them in PIT-ZG as foreign income.
How do I carry forward losses from previous years?
Losses from previous years can be deducted from income in the current year. The calculator shows both income and losses. Fill in the appropriate fields in PIT-38, referring to your previous declarations.
Why does the application show incorrect purchase costs?
The FIFO method requires the full transaction history. If you only import data for the current year but purchased shares in previous years, the application has no information about the original purchase prices. Import files for all years since you started trading on IB.
What about account migration?
If your IBKR account was migrated (e.g., from one entity to another), go to "Select Account(s)" when creating a Flex Query, use the "Filter" button and check both "Open" and "Migrated" statuses. Press "Apply", confirm the selection, and continue. This ensures the report includes the full history from both the old and new accounts.
Related broker tax calculators
Compare related broker pages for PIT-38 and PIT-ZG.
Helpful links for filing
File Interactive Brokers in Polish PIT-38 without Excel
Import your Interactive Brokers report and let the calculator apply FIFO, NBP exchange rates, and prepare data for Polish PIT-38 and PIT-ZG.
Up to 50 transactions free • No credit card • No registration