Back to Blog
Cost Basis

How to Calculate Crypto Cost Basis: Step-by-Step Guide

December 20, 2025 14 min read

Understanding how to calculate your cryptocurrency cost basis is essential for accurate tax reporting. This guide walks you through the process with real-world examples for different scenarios.

What Is Cost Basis?

Cost basis is the original value of your cryptocurrency for tax purposes. It includes:

  • The purchase price of the cryptocurrency
  • Any fees paid to acquire it (exchange fees, network fees)
  • The fair market value if received as income (mining, staking, airdrops)

Cost Basis = Purchase Price + Fees

Capital Gain/Loss = Sale Price - Cost Basis

Step 1: Gather Your Transaction Records

Collect all records showing:

  • Date and time of each cryptocurrency purchase
  • Amount of crypto purchased
  • Price paid (including any fees)
  • The exchange or platform used

Most exchanges provide transaction history exports. Download CSV files from Coinbase, Binance, Kraken, and any other platforms you use.

Step 2: Calculate Cost Basis for Purchases

Simple Purchase Example

Example: Buying Bitcoin

  • You buy 0.5 BTC for $15,000
  • Exchange fee: $25
  • Total Cost Basis: $15,025
  • Cost Basis per BTC: $30,050

Crypto-to-Crypto Trade

When you trade one cryptocurrency for another, there are two transactions:

  1. A sale of the first cryptocurrency (taxable event)
  2. A purchase of the second cryptocurrency (establishes new cost basis)

Example: Trading BTC for ETH

You trade 0.5 BTC (cost basis $15,025) for 5 ETH when BTC = $50,000:

  • Sale of 0.5 BTC: Proceeds = $25,000
  • Capital Gain: $25,000 - $15,025 = $9,975
  • Cost Basis of 5 ETH: $25,000 (fair market value at time of trade)

Step 3: Handle Special Scenarios

Staking Rewards

When you receive staking rewards, the fair market value at the time of receiptbecomes your cost basis. This amount is also taxable as ordinary income.

Example: Staking Rewards

  • You receive 0.1 ETH as staking reward
  • ETH price at time of receipt: $2,000
  • Cost Basis: $200
  • Ordinary Income: $200 (report on Schedule 1)

Airdrops

Airdropped tokens are taxable when received. Your cost basis equals the fair market value at the time you gain control over the tokens.

Mining Income

Mined cryptocurrency is taxable as ordinary income. The cost basis equals the fair market value when the block reward is received (when the coins hit your wallet).

Gifts Received

If you receive crypto as a gift, your cost basis is generally the donor's cost basis (carryover basis). However, if the gift was worth less than the donor's basis when given, special rules apply for calculating losses.

Step 4: Choose Your Accounting Method

When you have multiple purchases of the same cryptocurrency at different prices, you need to decide which coins you're selling:

  • FIFO: First coins purchased are sold first (default IRS method)
  • LIFO: Last coins purchased are sold first
  • HIFO: Highest cost coins are sold first (often minimizes taxes)
  • Specific Identification: You choose which exact coins to sell

Read our detailed comparison of FIFO vs LIFO vs HIFO →

Step 5: Calculate Your Gain or Loss

For each sale or disposal:

  1. Determine the proceeds (sale price minus selling fees)
  2. Identify which lots you're selling based on your accounting method
  3. Use the cost basis for those specific lots
  4. Calculate: Gain/Loss = Proceeds - Cost Basis

Complete Example

You have the following BTC purchases and then sell 1 BTC for $45,000:

Jan 2024: 1 BTC @ $30,000
Apr 2024: 1 BTC @ $40,000
Aug 2024: 1 BTC @ $35,000

Using FIFO: Sell Jan lot → Gain = $45,000 - $30,000 = $15,000
Using HIFO: Sell Apr lot → Gain = $45,000 - $40,000 = $5,000

Common Mistakes to Avoid

  • Forgetting fees: Include all fees in your cost basis
  • Wrong dates: Use the trade date, not settlement date
  • Missing transfers: Transfers between your own wallets aren't taxable but must be tracked
  • Double counting: Don't count the same cost basis for multiple sales
  • Ignoring crypto-to-crypto trades: These are taxable events

Using BasisTracker

Manual cost basis calculation becomes nearly impossible with more than a handful of transactions. BasisTracker automates the entire process:

  • Import transactions from 50+ exchanges
  • Automatic cost basis tracking for every coin lot
  • Multiple methods: Compare FIFO, LIFO, and HIFO results
  • Per-wallet tracking for IRS 2025 compliance
  • Export reports ready for your tax return

Calculate Your Cost Basis Automatically

Let BasisTracker handle the complex calculations. Import your transactions and get accurate cost basis instantly.

Download BasisTracker

Conclusion

Calculating cryptocurrency cost basis requires careful record-keeping and understanding of tax rules for different transaction types. While manual calculation is possible for simple portfolios, most crypto investors benefit from using dedicated software to ensure accuracy.

Remember: accurate cost basis calculation is essential for proper tax reporting. When in doubt, consult a tax professional familiar with cryptocurrency taxation.