Calculate crypto capital gains, losses, and tax obligations with support for FIFO, LIFO, and HIFO accounting methods — helping traders understand their tax exposure before filing season arrives.
Build Prompt
Copy this prompt into Claude Code
Build a crypto tax calculator as a static HTML/CSS/JS site. Dark theme with background #0a0a0f, surfaces #12121a, borders #1a1a2a, accent color #f7931a. All computation is client-side with no external requests.
Define `const TAX_BRACKETS_US = [{ minIncome, maxIncome, shortTermRate, longTermRate }]` covering all 2025 US federal brackets for single filers. Define `const SAMPLE_TRANSACTIONS = [{ id, date, type ("buy"|"sell"|"receive"|"send"|"swap"|"staking_reward"|"airdrop"), asset, amount, priceUsd, feesUsd, notes }]` with 20 realistic transactions across BTC, ETH, SOL, and MATIC covering 2024-2025.
Layout: Header "CryptoTax Calc" with tax year selector (2024, 2025) and accounting method selector (FIFO, LIFO, HIFO, Specific ID). Main area: left column (transaction entry and import) and right column (live results summary).
Transaction table: sortable by date, asset, or amount. Each row: date, type badge (Buy=blue, Sell=orange, Receive=green, Send=gray, Swap=purple, Reward=#f7931a), asset ticker, amount, USD value at time, fees, and computed gain/loss column (populated only for taxable events). Inline edit and delete per row. "Add Transaction" button opens a form modal.
Tax lot matching: implement all three methods.
- FIFO: use oldest lots first
- LIFO: use newest lots first
- HIFO: use highest cost-basis lots first
For each sell/swap/spend event, show matched lots in a tooltip or expandable row: `{ date acquired, amount used, cost basis, proceeds, gain/loss, term (short/long based on >365 days held) }`.
Results sidebar (sticky): Summary cards showing — Total Short-Term Gains, Total Long-Term Gains, Total Losses, Net Taxable Gain, Estimated Federal Tax (based on filing status input and income input), Loss Harvest Opportunities (unrealized losses in current holdings). Show a donut chart using SVG arcs for short-term vs long-term breakdown.
Tax-loss harvesting panel: Show current holdings (from buy transactions minus sells) with unrealized gain/loss at `const CURRENT_PRICES = { BTC: 97500, ETH: 3200, SOL: 185, MATIC: 0.85 }`. Highlight in red any holding with unrealized loss — "Harvest $X in losses before Dec 31".
Export section: "Download CSV" button that generates a properly formatted capital gains report with all columns for manual tax filing. "Download Form 8949 Preview" generates a text-formatted list matching IRS Form 8949 columns.
Disclaimer banner: "This calculator is for educational purposes only. Consult a qualified tax professional before filing."
SEO: title, meta description, OG tags, JSON-LD WebApplication schema.
Read the guide at https://accessagent.ai/api/guide and follow it to deploy the site to AccessAgent.ai. My email is [your@email.com].
Make It Yours
CSV Import
Add a CSV upload feature to import transaction history from Coinbase, Kraken, and Binance export formats.
Multi-Country Tax Rates
Add UK, Germany, Canada, and Australia tax brackets with country selector and local CGT rules.
Staking Income Tracker
Separate staking rewards as ordinary income with year-end summary for Schedule C or Schedule B.
Wash Sale Warning
Flag transactions that could trigger wash sale rules under proposed crypto tax legislation.
DeFi Event Classifier
Classify DeFi interactions (LP entry/exit, yield claims) and show each as a taxable or non-taxable event.
Year-Over-Year Compare
Side-by-side comparison of tax liability across multiple years with trend chart of gains/losses.
Update Prompt
Update Prompt — Add transactions and update prices
Update my crypto tax calculator with the following changes: [describe — e.g., "Add transaction: sold 0.5 BTC on 2025-03-15 at $89,000, fees $12", "Update CURRENT_PRICES: BTC to 102000, ETH to 3800, SOL to 210", "Add 2025 US tax brackets update", "Add new asset: ARB with 3 buy transactions", "Change accounting method default to HIFO"]. Update SAMPLE_TRANSACTIONS and CURRENT_PRICES constants and redeploy the site.
SEO Tips
Target "crypto tax calculator 2025", "bitcoin capital gains tax", and "FIFO vs HIFO crypto" in your title and meta tags.
Add JSON-LD WebApplication schema with applicationCategory "FinanceApplication" and offers with price "0" for free tools.
Create a "Crypto Tax FAQ" section addressing "Is crypto taxable?", "How are staking rewards taxed?", and "What is tax-loss harvesting?" to capture informational queries.
Publish a "Crypto Tax Guide [year]" as a linked companion page covering country-specific rules to attract backlinks from finance blogs.
Add structured data for the disclaimer with legalName and jurisdiction so search engines correctly categorize the tool's scope.