| name | Crypto Tax Calculator |
| description | Calculate crypto capital gains taxes with FIFO/LIFO/average cost methods, multi-country tax law support, and HTML report generation. |
Crypto Tax Calculator ๐
A comprehensive cryptocurrency tax calculation engine. Import your trades, select your jurisdiction, and generate professional tax reports.
Workflow Overview
[Import CSV] โ [Parse Trades] โ [Match Cost Basis] โ [Calculate Gains] โ [Apply Tax Rules] โ [Generate Report]
โ โ โ โ โ โ
Validate Normalize FIFO/LIFO/AVG Short vs Long US/UK/AU/CN HTML + CSV
Format Currencies Cost Matching Term Gains Rate Tables Tax Report
Step 1: Prepare Your Data
Your CSV must have these columns (order doesn't matter):
| Column | Required | Format | Example |
|---|
| date | โ
| YYYY-MM-DD HH:MM:SS | 2024-03-15 14:30:00 |
| type | โ
| buy/sell/swap/transfer | buy |
| asset | โ
| Symbol | BTC |
| amount | โ
| Decimal number | 0.5 |
| price_usd | โ
| USD value per unit | 65000.00 |
| fee_usd | โ | Fee in USD | 2.50 |
| exchange | โ | Exchange name | Binance |
| tx_hash | โ | Transaction hash | 0xabc... |
Step 2: Choose Your Method
bash scripts/crypto-tax-calc.sh calculate --input trades.csv --method fifo --country US
bash scripts/crypto-tax-calc.sh calculate --input trades.csv --method lifo --country US
bash scripts/crypto-tax-calc.sh calculate --input trades.csv --method average --country UK
Step 3: Select Jurisdiction
๐บ๐ธ United States
- Short-term gains (<1 year): Taxed as ordinary income (10%-37%)
- Long-term gains (>1 year): 0%, 15%, or 20%
- Wash sale rules: Currently not enforced for crypto (may change)
- Form 8949 generation supported
๐ฌ๐ง United Kingdom
- Capital Gains Tax: 10% (basic) / 20% (higher rate)
- Annual exempt amount: ยฃ6,000 (2024/25)
- Must use share pooling (average cost)
- HMRC-compatible report format
๐ฆ๐บ Australia
- CGT discount: 50% for assets held >12 months
- Marginal tax rates apply (19%-45%)
- Personal use asset exemption <$10,000
- ATO-compatible output
๐จ๐ณ China
- Individual income tax: 20% on gains
- Currently ambiguous regulation
- Report provides gain calculations for reference
Step 4: Generate Report
The tool outputs:
- HTML Report โ Visual summary with charts, tables, per-asset breakdown
- CSV Export โ Machine-readable gain/loss per trade
- Summary JSON โ Totals for integration with other tools
Full Command Reference
bash scripts/crypto-tax-calc.sh calculate --input FILE --method METHOD --country CODE [--year YEAR]
bash scripts/crypto-tax-calc.sh validate --input FILE
bash scripts/crypto-tax-calc.sh summary --input FILE --method METHOD
bash scripts/crypto-tax-calc.sh merge --inputs "file1.csv,file2.csv" --output merged.csv
bash scripts/crypto-tax-calc.sh compare --input FILE --country CODE
Important Disclaimers
โ ๏ธ This tool is for informational purposes only. It is NOT tax advice. Consult a qualified tax professional for your specific situation.
โ ๏ธ Tax laws change frequently. Always verify current rates and rules with your local tax authority.