Cost basis is the amount used to measure gain or loss when an asset is sold: what it cost to acquire, including transaction costs, or the value recognised as income where the asset was received rather than bought. Gain or loss on a sale is the difference between the proceeds and the basis of the units sold.
For a purchase, basis is the price paid plus the costs of acquiring the units, such as an exchange fee. For units received in a swap, basis is the value of what was received at the time of the exchange. For units received as income, such as staking rewards, airdrops or payment for work, basis is the amount included in income when they were received. Units received as a gift or by inheritance take basis under their own rules.
Basis belongs to a tax lot, not to a token in general. Three purchases of the same coin at three prices are three lots with three bases, and a sale uses the basis of whichever lot the ordering rule or the taxpayer's identification assigns to it. Transferring units between the holder's own wallets carries the basis with the units. It does not reset it.
Basis is established from records: the exchange trade history showing price and fee, the on-chain record of a swap, the value of a reward when it was credited. Where a lot's basis cannot be substantiated, it is treated as zero and the whole of the proceeds is gain. Basis is therefore only as good as the acquisition history behind it, which is why a holding whose early history is missing is a problem long before it is sold.
Section 1012 provides that the basis of property is its cost. For crypto bought with dollars, that is the amount paid plus transaction costs. Under Revenue Ruling 2023-14, staking rewards are included in gross income at their fair market value when the taxpayer gains dominion and control over them, and that amount becomes the basis of the units. Under Revenue Ruling 2019-24, units received in an airdrop following a hard fork are ordinary income at fair market value when received, with the same result for basis. Notice 2014-21 gives crypto received as payment for goods or services a basis equal to its fair market value in dollars on the date of receipt.
Under Regulations section 1.1012-1(j), for units acquired or disposed of on or after January 1, 2025, basis is tracked by lot within the wallet or account that holds the units. A sale draws basis from lots in that wallet or account, by FIFO unless an adequate identification is made. Basis that had been pooled across wallets before 2025 is unattached basis and was allocated to wallets and accounts under Revenue Procedure 2024-28.
A broker's Form 1099-DA reports basis only where the broker holds the acquisition information, which for covered digital assets means units acquired in that account on or after January 1, 2026. Units transferred into the account from a wallet or another broker, and units acquired before that date, may appear with no basis or an incomplete one. The form is a report of what the broker knows; the taxpayer's own records establish the basis reported on Form 8949, and the two are reconciled rather than one copied from the other. See 1099-DA cost basis and transferred-in digital assets.
A swap of ETH for SOL is recorded as if the SOL inherited the ETH's original cost. The ETH disposal is reported with its gain, and the SOL lot is then booked at the ETH purchase price from two years earlier instead of the SOL's value on the day of the swap. The same appreciation is taxed twice, once on the ETH sale and again when the SOL is sold against an understated basis.
Read our Universal vs Wallet-Based Cost Tracking
CountDeFi provides done-for-you crypto tax accounting, including basis reconstruction from exchange and chain records, reward and airdrop valuation and reconciliation of Form 1099-DA against the taxpayer's own basis. See pricing.