A command-line tool for calculating Polish income tax on stocks and cryptocurrency (PIT-38 form). It imports transaction history from popular brokers, converts foreign currencies to PLN using official NBP exchange rates, and computes your tax liability.
| Broker | Stocks | Crypto |
|---|---|---|
| Revolut | Yes | Yes |
| E*Trade | Yes | — |
| Binance | — | Yes |
| Manual CSV | Yes | Yes |
pipx install pit-38Or from source:
pipx install .pit38 stock -f transactions.csv -y 2025pit38 crypto -f transactions.csv -y 2025Convert your broker's export into the standardized CSV format:
pit38 import revolut-stock -i revolut_export.csv -o transactions.csv
pit38 import revolut-crypto -i revolut_export.csv -o transactions.csv
pit38 import etrade -i etrade_export.csv -o transactions.csv
pit38 import binance -i binance_export.csv -o transactions.csvYou can combine multiple files from different brokers:
pit38 stock -f revolut.csv -f etrade.csv -y 2025You can also prepare transaction files manually. See the example formats:
- Stocks:
pit38/data_sources/stock_loader/example_format.csv - Crypto:
pit38/data_sources/crypto_loader/example_format.csv
This calculator implements Polish tax law for capital gains (PIT-38). For a detailed description of the rules, see:
- Import — broker plugins convert proprietary CSV exports into a standardized format
- Exchange — foreign currency amounts are converted to PLN using NBP average rates (table A) from the last business day before each transaction
- Calculate — stock profits use the FIFO method; crypto uses yearly cost/income aggregation
- Tax — 19% flat tax rate is applied, with automatic deduction of losses from previous years
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/This tool is provided for informational purposes only and does not constitute tax advice. Always verify your calculations with a qualified tax advisor before filing your PIT-38 declaration.
