To calculate crypto cost basis, start with what you paid for each unit in US dollars, add the fees you paid to acquire it, and then decide which units a sale used up. Gain or loss is the amount realized on the sale minus the basis of the units treated as sold, and since 2025 that matching is done separately inside each wallet or broker account.
This guide shows how to calculate crypto cost basis for a purchase, for coins received as income, and for a sale drawn from several lots. It covers the two identification methods the regulations allow, the wallet-by-wallet rule that took effect on January 1, 2025, the temporary relief the IRS extended through December 31, 2026, and what brokers now report on Form 1099-DA. A worked example compares first-in, first-out with specific identification on the same sale.
The IRS treats digital assets as property, so selling a coin, swapping it for another coin, or spending it is a disposition with a capital gain or loss. Basis is the figure you subtract from the amount realized to find that gain or loss. If you bought one unit for $2,000 and later sold it for a net $2,600, the gain is $600.
Basis also carries the acquisition date, which sets the holding period. The IRS digital asset FAQs say a gain is short term "If you held digital assets for one year or less before selling or exchanging the digital assets," and long term if you held them for more than one year. Getting the lot wrong can therefore change both the size of the gain and the rate applied to it.
For coins bought with cash, basis is the purchase price plus the costs of acquiring them. The IRS FAQs list digital asset transaction costs as including "transaction and 'gas' fees, transfer taxes, and commissions." Costs on the purchase side increase basis, and costs on the sale side reduce the amount realized.
A simple purchase looks like this:
| Item | Amount |
|---|---|
| 2 ETH at $1,800 each | $3,600 |
| Exchange fee on the purchase | $20 |
| Total basis of the lot | $3,620 |
| Basis per ETH | $1,810 |
When you buy in pieces over time, each purchase is its own lot with its own date, quantity and per-unit basis. Those lots are what the identification rules work on later, so a lot list per wallet is the core record.
Some coins arrive without a cash purchase. The source of the coin decides its basis.
Once a wallet holds several lots of the same coin, you need a rule for which lot a sale used. The final broker regulations, T.D. 10000, added these rules at Treas. Reg. § 1.1012-1(j), which "is applicable to all acquisitions and dispositions of digital assets on or after January 1, 2025."
Specific identification. For units you hold yourself, such as in an unhosted wallet, you may pick the units sold if you record them on your books no later than the time of the sale. The FAQs say you "must identify the particular units to be sold, disposed of, or transferred on your books and records," using an identifier "such as purchase date and time or the purchase price for the unit." Choosing the highest-basis lot (often called HIFO) or the latest lot (LIFO) are ways of making a specific identification. They are choices within this method and do not count as separate accounting methods.
The default rule (FIFO). If you do not make a valid identification, units are treated as sold "in order of time from the earliest date on which units of the same digital asset in this wallet were acquired by you." For units held at a broker, § 1.1012-1(j)(3)(i) applies the same earliest-first rule to units in that broker's custody. Notice 2026-20 refers to it as the "FIFO rule."
The regulation offers no averaging option. A blended average cost across all units, which some readers know from mutual funds or from UK share pooling, is outside the two approaches § 1.1012-1(j) describes.
Assume one self-custody wallet holds three ETH lots. All figures include purchase fees.
| Lot | Acquired | Quantity | Total basis | Basis per ETH |
|---|---|---|---|---|
| Lot 1 | 10 Mar 2024 | 2.0 ETH | $3,620 | $1,810 |
| Lot 2 | 5 Jan 2025 | 1.5 ETH | $5,415 | $3,610 |
| Lot 3 | 12 Feb 2026 | 1.0 ETH | $2,710 | $2,710 |
On 15 Sep 2026 the owner sells 2 ETH at $4,200 each and pays a $25 fee. The amount realized is $8,400 minus $25, or $8,375, which is $4,187.50 per ETH.
| Method | Units treated as sold | Basis | Gain | Character |
|---|---|---|---|---|
| FIFO default | 2.0 ETH from Lot 1 | $3,620 | $4,755 | All long term |
| Specific ID, highest basis | 1.5 ETH from Lot 2 and 0.5 ETH from Lot 3 | $6,770 | $1,605 | $866.25 long term, $738.75 short term |
| Specific ID, long-term lots only | 1.5 ETH from Lot 2 and 0.5 ETH from Lot 1 | $6,320 | $2,055 | All long term |
The highest-basis choice cuts the reported gain by $3,150 compared with FIFO, but $738.75 of it is short term because Lot 3 was held for under a year. The third row keeps every unit long term at the cost of a $450 larger gain than the highest-basis row. Which row produces the lower tax depends on the owner's bracket and other gains for the year, so preparers usually model both before the trade. Whichever lots are chosen, the selection must be on the books by the time of the sale. Recording it after year-end does not count, and the sale falls back to FIFO.
If any lot sold at a loss and the owner rebuys soon after, read our note on how the wash sale rule currently treats digital assets before relying on that loss.
Before 2025 many investors pooled every unit of a coin across all wallets and exchanges and picked lots from that single pool. From January 1, 2025, identification works inside each wallet or account. Rev. Proc. 2024-28 gave a safe harbor for moving from the old approach. Notice 2026-20 describes it as guidance on "how to transition from a universal or multi-wallet basis allocation methodology to a wallet-by-wallet or account-by-account basis allocation methodology."
The safe harbor let taxpayers make any reasonable allocation, as of January 1, 2025, of unused basis to the coins remaining in each wallet. Taxpayers could use a specific unit allocation or a global allocation. Per the revenue procedure, a taxpayer "must treat any allocation under this revenue procedure as irrevocable." For each type of coin, the allocation generally had to be completed before the first sale, disposition or transfer of that coin on or after January 1, 2025. Anyone who sold early in 2025 without allocating may need a preparer to review which basis sits in which wallet.
In practice, each wallet needs its own lot list. When coins move between your own wallets, the lots move with them, and any identification is made within the wallet the coins leave from.
The regulations expect that when coins sit at a custodial broker, you tell the broker which units to sell no later than the sale. Many brokers could not yet accept those instructions, so Notice 2025-7 let customers record identifications or standing orders on their own books during 2025. The IRS then issued Notice 2026-20, which "extends the relief period specified in Notice 2025-7 through December 31, 2026."
Under that relief, a customer can identify units on their own books "no later than the date and time of the sale," or record a standing order on their books before the units are sold. The relief applies only to coins held by a broker, and taxpayers using the Rev. Proc. 2024-28 safe harbor can rely on it only after completing their allocation. The notice also warns that "for 2026 transactions, the acquisition date and basis reported by a broker to a taxpayer" may differ from the lots on the taxpayer's books. The notice does not cover sales after December 31, 2026, so unless the IRS extends the relief again, identifications for 2027 sales need to reach the broker by the time of the trade.
Broker reporting is moving in step. The IRS digital assets page states that "Brokers must report gross proceeds for transactions effected on or after Jan. 1, 2025," and that "Brokers must report basis on certain transactions effected on or after Jan. 1, 2026." The Form 1099-DA instructions limit basis reporting to covered securities, meaning a digital asset "acquired after 2025" in the customer's account and "held in that account until the broker effects the disposition." Coins bought before 2026, or moved in from a self-custody wallet, are generally noncovered, and the broker may report proceeds without basis.
That leaves two jobs at filing time. For 2025 sales, the 1099-DA shows proceeds only, so the basis on Form 8949 comes entirely from your records. For 2026 sales of covered coins, compare the broker's basis with your own lot list and adjust on Form 8949 where they differ. Our guide to Form 1099-DA covers the box-by-box reconciliation, and the walkthrough of Schedule D and Form 8949 shows where the adjusted figures land.
The FAQs ask you to "maintain records that are sufficient to establish the positions taken on Federal income tax returns." For cost basis that usually means a per-wallet lot ledger with acquisition date and time, quantity, USD cost and fees, plus a log of every identification made at the time of sale and every transfer between your own wallets. Exchange exports and on-chain explorers fill most gaps. Crypto tax software can import those records and apply a chosen identification rule per wallet, though older lots bought on platforms that have since closed often have to be rebuilt by hand.
Businesses holding crypto face the same tax rules plus book accounting under ASU 2023-08, which our page on cryptocurrency accounting explains. Cleaning up these ledgers before January also shortens return preparation, a point our bookkeeping cleanup checklist makes for books in general.
How do I calculate crypto cost basis for coins I bought? Add the USD purchase price to the fees paid to acquire the coins, such as exchange commissions and gas fees, and divide by the number of units if you need a per-unit figure. Each purchase is a separate lot with its own date.
Can I use average cost for crypto in the US? The regulation at § 1.1012-1(j) provides for specific identification of units or, if no valid identification is made, the earliest-acquired-first default. It does not include an averaging method for digital assets.
Do I have to use FIFO for crypto? FIFO applies only when you do not make a valid specific identification. You can pick other lots if you record the choice on your books (or with your broker) no later than the time of the sale, within the wallet or account the coins leave from.
Will my exchange report my cost basis? For sales on or after January 1, 2026, brokers report basis for covered coins, which are those acquired in that account after 2025 and held there until sale. Coins bought earlier or transferred in from a self-custody wallet are noncovered, and the broker may report them without basis.
What happens if I cannot prove my basis? You need records that support the basis claimed on your return. For gifted coins the IRS FAQs say that without documentation of the donor's basis, your basis is zero, so reconstructing old purchases from exchange history is worth the effort.
Madras Accountancy supports US CPA firms with crypto bookkeeping and tax preparation work, including rebuilding per-wallet lot records, reconciling Form 1099-DA to client ledgers and preparing Form 8949 schedules for review. To discuss your firm's digital asset workload, contact our team.
This article is general information as of October 2026 and is not tax advice for any specific situation.

The section 4960 excise tax is 21% of nonprofit pay over $1M. From 2026 it covers all employees. See the medical carve-outs, Form 4720 and a worked example.

The paid family and medical leave tax credit is permanent from 2026. See the 12.5% to 25% rates, the premium option, the 6-month rule and how Form 8994 works.

Opportunity zones become permanent in 2027 under the One Big Beautiful Bill. See the new deferral, rural bonus, and the 2026 handoff.