Crypto Cost Basis: How Do You Calculate Gain or Loss?
Crypto tax usually becomes difficult before the sale.
The hard part is often knowing which units were sold and what basis belonged to them.
If you bought the same asset at different prices, moved it between wallets, earned some through staking, and later sold only part of the position, “what did I pay for my crypto?” is no longer one question.
It is a recordkeeping and identification problem.
What is crypto cost basis?
Basis generally begins with the cost of acquiring property and is adjusted when tax law requires.
For purchased digital assets, that commonly means starting with the purchase price and incorporating qualifying acquisition costs.
Basis matters because a later taxable disposition generally begins with:
amount realized − adjusted basis = gain or loss
A taxpayer who cannot establish basis can end up reporting too much gain.
A taxpayer who overstates basis can underreport gain.
Basis belongs to units, not the portfolio
Suppose you acquire 1 ETH for $1,500 and later another 1 ETH for $3,000.
You now own 2 ETH with total historical cost of $4,500.
But that does not mean each ETH automatically has $2,250 basis.
The lots retain their own tax histories unless an applicable identification or accounting rule produces a different result.
When one ETH is sold, the unit treated as disposed of matters.
Wallet- and account-level identification matters
The final digital-asset regulations moved the system toward wallet- and account-level unit identification rather than treating every unit of the same asset everywhere as one universal pool.
That makes location part of the tax record.
Taxpayers should preserve:
- acquisition date;
- quantity;
- acquisition price;
- transaction costs;
- wallet or custodial account;
- transfers between locations;
- disposition date;
- identification records.
Moving assets does not erase their history.
Specific identification
Specific identification can allow a taxpayer to identify the particular units being disposed of when the governing requirements are satisfied.
That can materially change reported gain.
Assume a taxpayer holds two BTC units:
- Lot A basis: $20,000
- Lot B basis: $60,000
One BTC is sold for $70,000.
If Lot A is the disposed unit, gain is $50,000.
If Lot B is properly identified, gain is $10,000.
The market transaction is identical.
The tax result differs because the disposed unit differs.
Specific identification therefore needs contemporaneous records. It should not become a year-end exercise in choosing whichever historical lot creates the preferred result.
What if adequate identification is not made?
When the taxpayer does not adequately identify units, the applicable default ordering rule controls.
Do not assume a tax software setting can retroactively create a valid identification that was never made under the governing rules.
The records should support the tax treatment.
Rev. Proc. 2024-28 transition rules
The move to wallet- and account-level basis rules created a transition problem for taxpayers whose historical records had effectively pooled units across locations.
Rev. Proc. 2024-28 provides transition procedures for allocating unused basis to digital-asset units held as the new regime takes effect.
The transition is not permission to manufacture basis.
It is a method for moving existing basis records into the new wallet/account framework.
Taxpayers with substantial pre-2025 holdings should preserve the records supporting whatever transition allocation they used.
Notice 2026-20 temporary identification relief
For qualifying custodial transactions through December 31, 2026, Notice 2026-20 provides temporary relief allowing qualifying taxpayers to make adequate identification in their own books and records under the Notice's requirements.
For 2026 federal income-tax purposes, a qualifying taxpayer identification can control even if the broker's information reporting reflects a different unit identification.
That creates a potential reconciliation issue:
broker reporting and taxpayer tax treatment can legitimately differ.
The taxpayer therefore needs records showing the identification actually made.
Transferred-in assets do not have zero basis
Suppose you buy ETH in a self-hosted wallet for $15,000 and later transfer it to an exchange.
The receiving exchange may not have your complete historical basis information.
That does not make the basis zero.
It means the asset can be noncovered for broker basis-reporting purposes while the taxpayer remains responsible for substantiating the actual basis.
A broker's missing basis is not the same thing as a taxpayer having no basis.
Self-transfers generally preserve basis
Moving digital assets between wallets or accounts owned by the same taxpayer generally does not itself reset basis merely because a blockchain transaction occurred.
The original basis and holding period generally continue.
But any digital asset disposed of to pay a network or service fee can create a separate tax event.
See the dedicated wallet-transfer guide for that distinction.
Transaction costs
Transaction costs require careful classification.
A qualifying cost associated with acquiring property can affect the acquired property's basis.
A qualifying disposition cost can reduce amount realized.
For digital-asset-for-digital-asset exchanges, the final regulations did not retain the proposed 50/50 allocation approach.
Under the final rule, qualifying digital-asset transaction costs in the covered exchange generally are allocated entirely to the disposition side, subject to the final regulations' cascading transaction-cost rule.
Do not use the superseded proposed 50/50 rule as though it were final law.
Example: crypto-for-crypto transaction costs
Assume:
- ETH adjusted basis: $2,000
- token received FMV: $3,000
- qualifying cash transaction cost: $60
Under the final transaction-cost rule, the $60 qualifying cost is generally allocated to the disposition.
Amount realized:
$3,000 − $60 = $2,940
Gain:
$2,940 − $2,000 = $940
The incoming token's basis generally begins with its $3,000 value under the exchange framework.
The proposed 50/50 allocation would produce a different result. It is not the final rule.
Income can create basis
Not every digital asset begins with a purchase.
If a taxpayer properly recognizes income when receiving:
- staking rewards;
- mining rewards;
- compensation;
- certain airdrops or distributions,
the amount included in income generally becomes important in establishing basis.
That prevents the same initial value from being taxed again when the asset is later sold.
Missing basis records
Missing records do not justify inventing basis.
Reconstruction can require:
- exchange statements;
- wallet histories;
- transaction hashes;
- bank records;
- contemporaneous tax returns;
- prior tax software exports;
- transfer tracing.
The objective is a supportable reconstruction, not an estimate selected to produce a desired gain.
A practical basis sequence
For each disposed unit, determine:
- How was it acquired?
- When was it acquired?
- What amount established initial basis?
- What qualifying costs affected basis?
- Where was the unit held?
- Was it later transferred?
- Was a valid specific identification made?
- What unit was treated as disposed of?
- What was amount realized?
- What records prove the calculation?
Related questions
Sources and authority
Governing authorities
- Primary authorities include IRC §§1001 and 1012, the final digital-asset regulations in T.D. 10000, Rev. Proc. 2024-28, Notice 2026-20, and applicable basis and identification regulations.