Kointax.ioKointax.io

How to calculate the cost price of your cryptocurrencies correctly

The cost price (cost basis) is the most important element to calculate your crypto profit. What it includes, what it doesn't and how to apply FIFO correctly.

Equipo declaracrypto·April 25, 2026·6 min read

How to calculate the cost price of your cryptocurrencies correctly

The cost price (or cost basis) of your cryptocurrencies is the starting point for calculating the capital gain or loss. An error here propagates incorrectness to the entire statement.

What does the cost price include?

The acquisition value of a cryptocurrency includes:

  1. The purchase price (in EUR, at the current exchange rate if purchased with another currency).
  2. Purchase commissions (trading fees, exchange commissions).
  3. Expenses directly related to the acquisition (for example, gas fees if you purchased on a DEX).

Formula:

Cost = Price paid + Purchase commissions + Associated expenses

What is NOT included in the cost price?

  • Custody or exchange subscription expenses (they are general expenses, not the asset).
  • Interest on loans to buy (not deductible for individuals).
  • Exchange rate losses on currency conversion (managed separately).

The FIFO method applied to cost

With FIFO, when you sell, the oldest lots are "consumed" first. Each batch has its own unit cost.

Example with 3 purchases:

  • Lot 1: 0.5 BTC at €20,000 per BTC → cost = €10,000
  • Lot 2: 0.3 BTC at €30,000 per BTC → cost = €9,000
  • Lot 3: 0.2 BTC at €60,000 per BTC → cost = €12,000

If you sell 0.6 BTC:

  • Entire Lot 1 is consumed: 0.5 BTC → cost €10,000
  • Lot 2 is partially consumed: 0.1 BTC → cost €3,000
  • Total cost of the sale = €13,000

Common complications

Purchases in foreign currency (USD, GBP…)

If you purchased on Coinbase paying in USD, the cost in EUR is the price in USD × ECB EUR/USD exchange rate on the purchase date.

Cryptocurrencies received as income (staking, airdrops)

The cost of acquiring cryptocurrencies received as income is their market value at the time of crediting (which was already declared as income that year).

When you sell them, the cost will be that value that you previously taxed as income.

Inherited or donated cryptocurrencies

  • Inheritance: Cost = value declared in the inheritance tax.
  • Donation received: Cost = market value on the date of the donation (declared in the ISD).

Gas fees on DEX operations

The ETH gas fees paid when executing a DEX operation are part of the cost of the corresponding operation:

  • If it is a purchase: they are added to the cost of the purchased asset.
  • If it is a sale: they reduce the net transmission value.

Most common errors in cost calculation

  1. Forget commissions → you pay more taxes than you owe.
  2. Do not convert the cost of purchases in USD to EUR → incorrect cost.
  3. Use average price instead of FIFO → method not allowed.
  4. Forget the cost of cryptos received as income → you calculate the profit on 0 instead of the reference price already declared.

Conclusion

Correct calculation of the cost price is the basis of an accurate tax return. Includes the price paid plus all associated commissions and expenses. With multiple purchases, the FIFO determines what cost corresponds to each sale. Tax software automatically manages this for you.

Ready to calculate your crypto taxes?

declaracrypto.es — FIFO, LIFO, HIFO or WAC method. 80+ compatible exchanges. Excel + PDF report ready for your tax return.

Start free — no card needed