Skip to main content

Polish investment tax calculator (PIT-38) for stocks and cryptocurrency

Project description

PIT-38 — Polish Investment Tax Calculator

🇵🇱 Wersja polska

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.

Supported Brokers

Broker Stocks Crypto
Revolut Yes Yes
E*Trade Yes
Binance Yes
Manual CSV Yes Yes

Quick Start

Install

pipx install .

Or with pip in a virtual environment:

python3 -m venv .venv
source .venv/bin/activate
pip install .

Calculate stock tax

pit38 stock -f transactions.csv -y 2025

Calculate crypto tax

pit38 crypto -f transactions.csv -y 2025

Import from broker

Convert 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.csv

You can combine multiple files from different brokers:

pit38 stock -f revolut.csv -f etrade.csv -y 2025

Manual CSV format

You can also prepare transaction files manually. See the example formats:

How It Works

  1. Import — broker plugins convert proprietary CSV exports into a standardized format
  2. Exchange — foreign currency amounts are converted to PLN using NBP average rates (table A) from the last business day before each transaction
  3. Calculate — stock profits use the FIFO method; crypto uses yearly cost/income aggregation
  4. Tax — 19% flat tax rate is applied, with automatic deduction of losses from previous years

Development

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
pytest tests/

Disclaimer

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.


Buy Me A Coffee

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pit_38-2026.4.20.tar.gz (29.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pit_38-2026.4.20-py3-none-any.whl (50.5 kB view details)

Uploaded Python 3

File details

Details for the file pit_38-2026.4.20.tar.gz.

File metadata

  • Download URL: pit_38-2026.4.20.tar.gz
  • Upload date:
  • Size: 29.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for pit_38-2026.4.20.tar.gz
Algorithm Hash digest
SHA256 41c5ac02bf09d074a986c5a0b6154b23ebcc66aa07744dc8041959a3aaed13e2
MD5 36d40281cd98911f110549f99265b907
BLAKE2b-256 f134c0b6e7df18b3fc92725b14b83111e5c8904ba348ce2e5d4b86f85182233d

See more details on using hashes here.

File details

Details for the file pit_38-2026.4.20-py3-none-any.whl.

File metadata

  • Download URL: pit_38-2026.4.20-py3-none-any.whl
  • Upload date:
  • Size: 50.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for pit_38-2026.4.20-py3-none-any.whl
Algorithm Hash digest
SHA256 f6fe02a7e71e0d1b7b5270d9e3dee5be4f44884b9933160623124574e143d2f3
MD5 486f488af99962047562693c40856749
BLAKE2b-256 dfbf6af134a312443ffa4a10af16756d8d0b87040103e9a41078e1c0f356a75f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page