Filing your Austrian E1kv: a step-by-step guide for IBKR investors
Published: May 2026 · 10 min read · Austrian investors · IBKR · E1kv · FinanzOnline
The previous post covered why doing Austrian tax reporting by hand is painful — FIFO across years, WHT reclaim, Nichtmeldefonds. This one covers how to use KapFrei to go from broker exports to a filed E1kv form. Three steps, as advertised.
If you haven't read part one, the short version: IBKR doesn't produce an Austrian tax report. KapFrei does.
What you'll have at the end
Before we start, here's what a single run produces in about 10 seconds:
dashboard.xlsx— an Excel file with the E1kv Summary tab pre-filled, plus separate Transactions, Dividends, and Trades sheets with a full audit trailfinanz_online.xml— an upload-ready E1kv XML block for FinanzOnlinewht_reclaim.txt— a report of withholding tax you can reclaim from Germany, Denmark, France, and Irelandanv_checklist.txt— deductions for your Arbeitnehmerveranlagung (home office, commute, Kirchenbeitrag, etc.)- Several supporting files: transaction log CSV, freedom dashboard, Nichtmeldefonds breakdown
The Excel file is what you'll use most. Every number in it is a live formula — you can click into any cell and see exactly where the figure comes from. No black box.
Step 1: Install and configure (one-time, ~20 minutes)
What you need
- Python 3.11+
- Your IBKR account credentials and a few minutes in the IBKR portal
Install the tool
git clone https://github.com/MatthiasViertler/TT-AUT.git kapfrei
cd kapfrei
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements.txt
Create your personal config
KapFrei keeps your personal data in users/{yourname}/config.local.yaml. This folder is gitignored — your account IDs, cost basis overrides, and personal settings never leave your machine.
mkdir -p users/yourname
cp config.yaml users/yourname/config.local.yaml
Open users/yourname/config.local.yaml and fill in the two required fields:
account_id:
- U12345678 # your IBKR account number (find it in Account Management)
finanz_online:
fastnr: "123456789" # 9-digit Finanz-Online number (strip spaces and slashes)
Set up the IBKR Flex Query (one-time, ~10 minutes)
KapFrei auto-fetches your transaction data via IBKR's Flex Web Service. You configure this once:
- Log in to IBKR Client Portal → Reports → Flex Queries → Create New
- Name it anything (e.g. "KapFrei"), set Period → Year to Date
- Under Activity, tick: Trades, Dividends, Withholding Tax, Cash Transactions, Open Positions, Cash Report
- For each section, tick all fields
- Save and note the query ID (the number in the URL)
- Go to Settings → Flex Web Service → Manage Tokens and generate a token
Create users/yourname/secrets.local.yaml:
ibkr_flex:
token: "your_token_here"
query_id: 123456
From now on, every run auto-fetches the latest data. You never export CSVs manually.
Already have prior-year IBKR exports? Put them in
users/yourname/data/IB/{year}/. KapFrei reads all years in date order and passes the full history through FIFO — so 2025 sells correctly drain 2021 lots.
Step 2: Run the tool
python main.py --person yourname --year 2025
Replace yourname with whatever you named your folder, and 2025 with the tax year you're filing. That's the entire command.
What happens in those 10 seconds:
- Auto-fetch: KapFrei fetches today's IBKR Flex data and saves it to your data folder
- Parse: reads every broker export file in your data folder (IB, SAXO, E*Trade)
- FX lookup: fetches ECB exchange rates for every transaction date (cached to disk after the first fetch)
- FIFO: matches every sell against its lots in strict date order, across all years
- Tax: applies KeSt rules, credits WHT, calculates Nichtmeldefonds AE
- Output: writes seven files to
users/yourname/output/2025/
The terminal shows a summary when it's done:
KZ 862 (inland dividends + interest) .....EUR 1,613.10
KZ 863 (foreign dividends + interest) ....EUR 11,422.64
KZ 891 (domestic losses) .................EUR 1,107.12
KZ 892 (foreign losses) ..................EUR 4,735.24
KZ 994 (foreign gains) ...................EUR 9,291.87
KZ 899 (KESt from domestic WHT) ..........EUR 443.60
KZ 998 (creditable foreign WHT) ..........EUR 1,286.20
─────────────────────────────────────────────────────────
KESt remaining to pay.....................EUR 3,789.03
If you see warnings (FIFO mismatches, missing FX rates), read them — they usually mean a missing prior-year file or a ticker rename that needs a config entry.
Step 3: Read the Excel and file in FinanzOnline
Open users/yourname/output/2025/yourname_2025_dashboard.xlsx. The first tab is E1kv Summary.
The E1kv Summary tab

The sheet is divided into five sections matching the official E1kv form:
| Section | What it covers | Key KZ fields |
|---|---|---|
| 1.3.1 | Dividends + interest (27.5% rate) | KZ 862 (domestic), KZ 863 (foreign) |
| 1.3.2 | Capital gains — realised (§27 Abs. 3) | KZ 981/994 (gains), KZ 891/892 (losses) |
| 1.3.3 | Derivatives (§27 Abs. 4) | KZ 982/995, KZ 893/894 |
| 1.3.4 | Investment funds | KZ 897/898 (distributions), KZ 936/937 (AE) |
| 1.3.5 | Crypto (§27b) | KZ 171/173/175 |
Below the KZ fields is the BERECHNUNG section — this is where the tool calculates your net tax:
Steuerpflichtiger Gesamtbetrag (Saldo 1.3) [sum of all KZ values]
KeSt (27.5%) [× 0.275]
Anzurechnende Quellensteuer (KZ 998) [capped at 15% of foreign income]
Verbleibende KeSt zu bezahlen [what you actually owe]
Click into any blue cell — it's a formula. The proceeds column references the Trades tab, which references individual transactions. Nothing is hardcoded except the values that can't be derived from broker data (KZ 862/863 include interest that doesn't appear in the Dividends tab, so those are set directly from the Python output).
The other tabs
Before copying numbers into FinanzOnline, spend 2 minutes on the supporting tabs:
- Dividends: every dividend with its WHT, FX conversion, and per-row creditable WHT calculation. The
WHT Creditable EURcolumn applies the 15% treaty cap row by row. The sum goes to KZ 998. - Trades: every buy and sell with FIFO cost basis and gain/loss. The gain/loss formula is
=EUR proceeds − EUR cost basis − EUR commission. The SUMPRODUCT summary rows feed KZ 891/892/981/994 in the Summary tab. - Freedom: if you've configured it, your FIRE dashboard with portfolio value and projected income.
Entering the numbers in FinanzOnline
📸 [Screenshot: FinanzOnline → Arbeitnehmerveranlagung → Beilagen → E1kv]
- Log in to finanzonline.bmf.gv.at
- Go to Eingabe → Erklärungen → Arbeitnehmerveranlagung
- In the beilagen section, open E1kv (Einkünfte aus Kapitalvermögen)
- Work through each section, copying KZ fields from the Excel:
| KapFrei field | FinanzOnline field | Notes |
|---|---|---|
| KZ 862 | Kennzahl 862 | Inland dividends + interest |
| KZ 863 | Kennzahl 863 | Foreign dividends + interest |
| KZ 891 | Kennzahl 891 | Domestic losses — enter as positive number |
| KZ 892 | Kennzahl 892 | Foreign losses — enter as positive number |
| KZ 994 | Kennzahl 994 | Foreign gains |
| KZ 899 | Kennzahl 899 | KESt already paid by domestic WHT |
| KZ 998 | Kennzahl 998 | Creditable foreign WHT |
⚠️ Losses are shown as negative in the Excel but entered as positive in FinanzOnline. KZ 891 might read −€1,107 in the BERECHNUNG section — enter 1107 in FinanzOnline. The tool notes this in the Excel footer.
📸 [Screenshot: FinanzOnline E1kv form — KZ 862 and KZ 863 filled in]
Or: upload the XML directly
Instead of copying fields manually, you can upload the generated XML:
- Open
yourname_2025_finanz_online.xmlin a text editor and verify your Fas-Nr is correct - In FinanzOnline: Eingabe → Dateiupload → E1kv XML
- Upload the file and review the prefilled form before submitting
📸 [Screenshot: FinanzOnline XML upload screen]
What to double-check before submitting
Losses are in absolute values
The Excel shows losses as negative numbers in the BERECHNUNG (to make the subtraction visible). In FinanzOnline, KZ 891 and KZ 892 are entered as positive numbers. FinanzOnline applies the subtraction itself.
KZ 936/937: Meldefonds AE
If you hold any OeKB-registered funds (most Austrian and many European ETFs), the annual ausschüttungsgleiche Erträge go in KZ 936 (domestic) and KZ 937 (foreign). KapFrei fills these in automatically if you've configured your fund ISINs — but the values come from OeKB data you enter manually in data/oekb_ae.yaml. The tool warns you if any entries are missing or still marked as PLACEHOLDER.
If you don't hold any Meldefonds, ignore KZ 936 and KZ 937 entirely.
KZ 937: Nichtmeldefonds AE
If you hold US REITs, BDCs, or other non-OeKB-registered funds (ARCC, OHI, O, EPR, WPC, etc.), KapFrei calculates the §186 InvFG pauschal AE automatically. The amount appears in KZ 937 in the Excel. The Nichtmeldefonds tab shows the breakdown by symbol — check that the year-end prices look right.
The BERECHNUNG number isn't what you pay FinanzOnline
The "Verbleibende KeSt zu bezahlen" in the BERECHNUNG section is the net KeSt you owe after all credits. But this isn't a direct payment — it's what FinanzOnline calculates after you submit the E1kv. Any overpayment (e.g. if you had KeSt deducted at source from an Austrian broker) becomes a refund. Any underpayment becomes a tax bill.
What's not covered yet
A few things fall outside the current scope:
- Meldefonds AE data entry: KapFrei knows the OeKB structure but you need to supply the AE/WA figures from my.oekb.at manually. A future version will automate this.
- Older pre-2011 securities at 25%: KZ 864/865 (gains) and the corresponding loss KZs exist in the tool but are rarely needed for modern portfolios.
- WHT reclaim filing: KapFrei generates the Cerfa 5001 (France) automatically and produces the reclaim report, but the actual filing is manual. The next blog post covers this end to end.
TL;DR checklist
- [ ] Install KapFrei, create
users/yourname/config.local.yaml - [ ] Set up IBKR Flex Query (once, ~10 minutes)
- [ ] Run:
python main.py --person yourname --year 2025 - [ ] Open the Excel → review E1kv Summary tab
- [ ] Copy KZ fields to FinanzOnline (or upload XML)
- [ ] Enter losses as positive numbers in FinanzOnline
- [ ] Submit
Questions or edge cases? Leave a comment on Substack — I try to answer everything.
KapFrei is a tax calculation tool, not a licensed tax advisor. Results depend on the data you provide and your specific tax situation. Austrian tax law (§27 EStG, InvFG §186) applies.