Crypto Tax Calculator
Turns a CSV of crypto buy/sell transactions into a FIFO-matched capital gains report — the same accounting method the IRS defaults to when no other method is elected.
When to use this skill
- Reconciling realized gains/losses at tax time from exchange or wallet exports
- Estimating short-term vs long-term tax exposure before deciding whether to hold a position past the 1-year mark
- Producing a lot-by-lot audit trail (acquired date, sold date, cost basis, proceeds, gain/loss) to hand to an accountant
How to use it
- Export your transaction history to a CSV with columns:
date,type,asset,quantity,price_usd,fee_usd(seescripts/tax_calc.pydocstring for the exact format and an example). - Run:
python3 scripts/tax_calc.py transactions.csv --year 2025 --out report.csv - Read the console summary for short-term/long-term totals per asset, and
open
report.csvfor the full lot-by-lot breakdown.
Limitations
- FIFO only (no specific-ID or LIFO lot selection)
- Requires complete buy history for every sell — a sell with no matching buy lot in the input will print a warning and be skipped
- Does not account for wash-sale rules, staking/airdrop income basis, or jurisdiction-specific tax treatment
- This is a cost-basis estimation tool, not tax advice
