Last updated: November 23, 2026
Crypto cost basis is the starting point for working out a gain or loss when you make a taxable disposition of digital assets. For U.S. taxpayers, the calculation depends on how you received the units, qualifying fees and which units you identify as sold.
This guide summarizes federal rules described in the IRS materials cited here. Tax rules differ by country, and individual circumstances can affect reporting.
Quick answer
For a cash purchase, crypto cost basis generally starts with the amount paid plus qualifying costs to make the purchase. When you sell, subtract the adjusted basis of the units sold from the amount realized, which includes cash received minus eligible sale costs.
How to calculate crypto cost basis step by step
- Gather each acquisition record. Record the asset, quantity, date, wallet or account, and what you paid or received. Keep records at the level of individual units or lots, rather than relying only on a portfolio-wide balance. The IRS says taxpayers must keep records sufficient to establish basis and adjusted basis.
- Set the starting basis. If you bought crypto with cash, the IRS says basis is the amount paid plus qualifying transaction-service costs, such as a fee paid to make the purchase. Save the exchange statement or transaction receipt so the amount and fee can be checked later.
- Handle crypto received as payment correctly. For crypto received for services, the IRS says basis is its fair market value in U.S. dollars when received, provided that value is included in income. The IRS FAQ says this rule applies to transactions on or after January 1, 2025.
- Track qualifying costs separately. The IRS includes costs paid for services to effect a purchase, sale or disposition, such as transaction or gas fees, transfer taxes and commissions. A fee paid solely to move crypto between your own wallets is not treated as a digital-asset transaction cost. Don’t add that internal transfer fee to basis as if it were a purchase cost.
- Identify the units you dispose of. A partial sale may involve units acquired at different times and costs. For an unhosted wallet, the IRS says specific identification for transactions on or after January 1, 2025 requires identifying the units in records no later than the transaction date and keeping records showing their removal. If requirements aren’t met, the default is earliest-acquired units first within that wallet.
- Calculate the result in U.S. dollars. Subtract the adjusted basis of the units sold from the amount realized. For a sale for U.S. dollars, the IRS says amount realized includes cash received and is reduced by transaction costs allocable to the sale. The result is a gain if positive and a loss if negative.

Crypto cost basis rules at a glance
| Situation | Basis or calculation | Record to retain |
|---|---|---|
| Cash purchase | Amount paid plus qualifying purchase-service costs | Receipt, fee and acquisition date |
| Payment for services | U.S. dollar fair market value when received, if included in income | Receipt date, value and income record |
| Sale for U.S. dollars | Amount realized minus adjusted basis | Sale proceeds, eligible costs and units sold |
| Unhosted wallet, partial sale | Specific identification if requirements are met; otherwise earliest acquired units in that wallet | Identification made by transaction date and removal record |
Wallet and account boundaries matter. For a partial sale from a broker-custodied account after December 31, 2025, the IRS requires you to tell the broker which units are being sold by the transaction date, using identifiers the broker accepts, and keep records supporting that identification. If requirements aren’t met, the default is earliest-acquired units first within that broker’s custody. This isn’t the same as selecting the lowest-cost units across every account.

Common mistakes and risks
Using one figure for every unit. A single average across wallets can hide the acquisition date and basis of the specific units sold. Keep lot-level records and follow the identification rules that apply to the wallet or broker account.
Forgetting fees or counting them twice. Purchase costs can affect basis, while eligible sale costs reduce amount realized. Record each fee with the transaction it relates to. A cost paid only to transfer assets between your own wallets isn’t a transaction cost under the IRS FAQ.
Missing older records. Lost exchange access, incomplete wallet histories or unsupported unit identification can make it harder to establish adjusted basis. The IRS’s Revenue Procedure 2024-28 describes a safe harbor for eligible taxpayers to reasonably allocate unused digital-asset basis to wallets or accounts holding corresponding remaining units as of January 1, 2025. Eligibility and recordkeeping requirements apply, so don’t assume the safe harbor applies to every account.
Basis is a tax calculation, not a measure of investment safety. Crypto prices can be volatile, and exchange or wallet access, scams and asset loss create separate risks. The IRS’s post-2024 digital-asset FAQs generally apply to transactions on or after January 1, 2025. The 2025 Form 8949 instructions direct taxpayers to use boxes G, H or I for short-term digital-asset transactions and boxes J, K or L for long-term transactions. Tax rules differ outside the United States; consult a qualified tax professional about your circumstances.

Crypto cost basis FAQ
How do I calculate crypto cost basis for a sale?
Find the adjusted basis for the particular units sold, then subtract it from the amount realized. For a sale for U.S. dollars, amount realized is cash received less transaction costs allocable to that sale, according to the IRS.
Do crypto fees count toward cost basis?
Qualifying fees paid to effect a purchase can be included in basis. The IRS also says transaction costs can include fees for a sale or disposition. A fee paid solely to transfer crypto between your own wallets is not treated as a digital-asset transaction cost.
What if I can’t identify which crypto units I sold?
The default depends on custody. The IRS says earliest-acquired units first applies within the relevant unhosted wallet or broker custody when specific-identification requirements aren’t met. Keep acquisition and transfer records so you can establish which units were available and removed.
Sources
- Frequently asked questions on digital asset transactions, Q56; Digital assets page (www.irs.gov)
- Instructions for Form 8949 (2025) (www.irs.gov)
- Revenue Procedure 2024-28; Frequently asked questions on digital asset transactions, Q93 (www.irs.gov)
This article is for informational purposes only and does not constitute financial or investment advice. Cryptocurrencies are highly volatile; always do your own research before investing.

