How to Calculate Capital Gains: Crypto & DeFi Guide 2026

How to Calculate Capital Gains: Crypto & DeFi Guide 2026

2 min read

Learn how to calculate capital gains on crypto & DeFi trades. Our 2026 guide covers cost basis, accounting, staking, airdrops, & tax tools.

You open your wallet history to calculate gains and it looks manageable for about ten seconds. Then you remember the bridge, the LP deposit, the unstake, the airdrop claim, the token migration, the random memecoin swap on a sidechain, and the gas paid across all of it.

That's where most crypto tax guides stop being useful. They explain a clean buy-and-sell example, but active DeFi trading rarely looks clean. If you're copying wallets, farming yields, rotating between chains, and taking partial exits, learning how to calculate capital gains means building a process that survives messy on-chain activity.

The good news is that the core logic is still simple. The hard part is applying it consistently across fragmented wallet data. Once you know how basis, disposal events, and holding periods work, the rest becomes a recordkeeping and classification problem.

The Foundations of Crypto Capital Gains

Most traders get tripped up because they mix up paper gains with taxable gains.

If your token doubled but you still hold it, that gain is unrealized. It may matter for your portfolio, but it usually isn't the event that creates capital gains tax. The tax event generally happens when you dispose of the asset. In crypto, that usually means selling for fiat, swapping into another token, or spending the asset.

Realized gain is what matters

The IRS framework is straightforward. You calculate gain or loss by subtracting your adjusted basis from the amount realized on sale, then classify the result based on holding period. Assets held for more than one year are long-term, and assets held for one year or less are short-term. Most capital asset sales are reported on Form 8949 and summarized on Schedule D under IRS Topic No. 409.

That means a swap from ETH into a newer token isn't just a portfolio move. For tax purposes, it often creates two things at once:

  1. A disposal of ETH
  2. A new acquisition of the token you received

A lot of DeFi traders miss that second point. They track exits emotionally, not tax-lot by tax-lot.

Practical rule: If the transaction changed what asset you own, assume you need to test whether a taxable disposal happened.

The basic formula in crypto terms

In practice, the formula looks like this:

StepWhat you identifyWhy it matters
BasisWhat you paid for the crypto, adjusted as neededThis is your tax starting point
Amount realizedWhat you received when you sold, swapped, or spent itThis sets the exit value
Gain or lossAmount realized minus adjusted basisThis determines taxable result
Holding periodTime between acquisition and disposalThis affects short-term or long-term treatment

Start tracking smart money today

Join thousands of traders using WalletFinder.ai to find profitable wallets and copy their trades.

Start Free Trial →

Related Articles