How to Calculate Bitcoin Cost Basis
What is Bitcoin Cost Basis?
The Bitcoin Cost Basis Calculator tracks the adjusted cost basis of Bitcoin holdings across multiple purchases using FIFO (First In First Out), LIFO (Last In First Out), or HIFO (Highest In First Out) accounting methods to determine capital gains or losses on sales.
Formula
- SP
- Sale Price ($) — Price at which Bitcoin was sold
- CB
- Cost Basis ($) — Purchase price of the specific lot being sold, including fees
- HP
- Holding Period (days) — Days between purchase and sale (>365 = long-term)
- CG
- Capital Gain ($) — Profit or loss on the sale (Sale Price - Cost Basis)
Step-by-Step Guide
- 1Enter all Bitcoin purchase transactions with date, amount, and price paid
- 2Enter the sale transaction details (date, amount sold, price received)
- 3Select the accounting method: FIFO (oldest lots first), LIFO (newest first), or HIFO (highest cost first)
- 4The calculator matches sold BTC to specific purchase lots and computes gain/loss per lot
Worked Examples
Common Mistakes to Avoid
- ✕Not tracking every purchase lot separately — each buy creates a new tax lot with its own basis
- ✕Mixing accounting methods within the same tax year without consistency
- ✕Forgetting to include exchange fees and gas costs in the cost basis (they increase basis, reducing gains)
Frequently Asked Questions
Which cost basis method saves the most on taxes?
HIFO (Highest In First Out) typically minimizes current-year taxes by selling the highest-cost lots first, resulting in the smallest capital gain. However, this defers taxes to future years when you sell the lower-cost lots.
Can I switch cost basis methods?
The IRS requires consistency within a tax year for the same asset. You can use different methods for different assets (e.g., FIFO for BTC, HIFO for ETH). Specific identification is the most flexible — consult a tax professional.
Do exchange fees count toward cost basis?
Yes — purchase fees (exchange fees, network fees) increase your cost basis, and selling fees reduce your net proceeds. Both reduce your taxable gain. Always track fees as part of each transaction.
Ready to calculate? Try the free Bitcoin Cost Basis Calculator
Try it yourself →