A Python web application for tracking ESPP, RSU, and market stock transactions and calculating Polish PIT-38 capital gains tax.
- Track buy/sell operations for ESPP, RSU, and market stocks (stocks you buy yourself on a brokerage)
- Automatic NBP currency rate fetching (USD→PLN)
- FIFO cost basis calculation
- Annual tax report (income, tax at 19%)
- Modern web interface
| Stock Type | Cost Basis | Taxable Income |
|---|---|---|
| ESPP | Purchase price × qty × rate | Capital gain only (proceeds - cost basis - fee) |
| RSU | 0 (employer-paid) | Full proceeds (proceeds - fee) |
| Stock | Purchase price × qty × rate | Capital gain only (proceeds - cost basis - fee) |
- ESPP: You pay for shares (cost deducted from salary, discount applied). When you sell, only the difference between sell and buy price is taxable.
- RSU: Fully paid by employer. You pay tax on the entire sale value.
- Stock: Regular market purchase (brokerage). Same tax treatment as ESPP—only the gain is taxable.
Requires uv.
uv syncuv run uvicorn app.main:app --reload