Crypto cost basis methods: FIFO, specific identification and the wallet-by-wallet rule

Crypto cost basis is what you paid for the units you sell, fees included. Since January 1, 2025 each wallet or account keeps its own basis records, and units are matched by specific identification or, by default, first in, first out.

By Sonic Wallet Editorial Team· Updated · 9 min read

Key takeaways

  • Crypto cost basis is what you paid for the units you sell, including purchase fees, and your gain or loss is the sale proceeds minus that basis. Since January 1, 2025, basis is tracked wallet by wallet and account by account. Unless you identify specific units by the time of the sale, the units acquired earliest in that wallet or account are treated as sold first.
  • HIFO and LIFO are not separate methods but ways of making a specific identification. A broker can apply them through a standing order, and switching between them is not a change in accounting method.
  • Through 2026, broker customers may record their unit choices in their own books; from 2027 the broker must receive the choice no later than the sale.
  • In our worked example, selling one of three units for $50,000 gives a $20,000 long-term gain under FIFO, a $5,000 short-term gain under LIFO and a $10,000 long-term loss under HIFO.
  • Rev. Proc. 2024-28 let holders assign pre-2025 basis to the coins in each wallet as of January 1, 2025. For calendar-year individuals the specific allocation deadline has passed; at the latest it was the extended 2025 return due date, October 15, 2026.

Every sale, swap or purchase paid in crypto needs two numbers: what you received and what the units cost you. The second number, your cost basis, depends on which units count as sold, and since January 1, 2025 the IRS rules for choosing them work wallet by wallet. This guide explains what goes into basis, how first in, first out (FIFO) and specific identification work now, where highest in, first out (HIFO) fits, what the Rev. Proc. 2024-28 safe harbor did, and how much the choice matters on one set of lots. The crypto hub covers how crypto is taxed more broadly.

What counts as crypto cost basis?

Cost basis is what it cost to acquire a coin, fees and commissions included, and you subtract it from the sale proceeds to find your gain or loss.

How you got the coinsYour basisHolding period begins
Bought with dollarsThe price plus purchase feesThe day after the purchase
Swapped for another coinMarket value of the coins receivedThe day after the swap
Received as pay, or as staking or mining rewardsMarket value you counted as incomeThe day after receipt
Received as a giftGenerally the giver's basis, with a lower figure for measuring a lossIncludes the giver's holding period, if documented

The 2024 regulations set precise fee rules. On a purchase for cash, the fee adds to the basis of the coins bought. On a swap of one coin for another, the whole fee is assigned to the coin you give up, lowering that sale's proceeds, and the new coin's basis is simply its market value. Paying a network fee in crypto to move coins between your own wallets is a disposition of the units spent on the fee, even though the move itself is not taxable.

Gift basis has a twist of its own, explained in crypto gifts and donations, and is staking income taxable? explains how rewards get their basis.

How does the wallet-by-wallet rule work?

Since January 1, 2025, a sale is matched only against units of that coin held in the same wallet or account, not against every unit you own.

Before 2025, many holders applied FIFO or specific identification across all their wallets at once, a universal approach the IRS acknowledged when it issued Rev. Proc. 2024-28. The final regulations, in Treasury Regulation section 1.1012-1(j), end that for acquisitions and sales from January 1, 2025: a hardware wallet, a mobile wallet and each platform account are separate pools. A cheap lot bought on one platform cannot be the unit sold from a different wallet.

Moving coins between your own wallets is not a sale, but the same ordering rules decide which units leave, and those units carry their original basis and purchase dates with them. For FIFO, the regulations count from the date you first acquired each unit and disregard the date it arrived in the wallet. A broker with no record of your purchase may still report transferred coins as if bought on arrival, one reason a Form 1099-DA can disagree with your books.

Regular buying multiplies the lots. A fixed purchase every month, as in dollar-cost averaging, creates 12 lots a year in that account, each with its own basis and date.

What is the difference between FIFO and specific identification?

FIFO counts the earliest-acquired units in a wallet or account as sold first; specific identification lets you name the units, if you do it in time.

Coins in a wallet you controlCoins held by a broker
If you identify nothingFIFO within that walletFIFO within that account
How to identify unitsRecord them in your own books by the date and time of the sale, by purchase date and time or priceTell the broker by the date and time of the sale, using an identifier it accepts; a standing order counts
RecordsMust show the identified units left that walletYou must keep records that back up the identification
2025 and 2026 reliefDoes not applyYour own books and records may be used instead

Under IRS relief, through December 31, 2026, you can identify the units you sell from a broker account, or record a standing order, in your own books and records rather than with the broker. From 2027, an identification for coins held by a broker counts only if it reaches the broker in time, so check what your platform supports before your first sale that year.

Average cost, familiar from mutual funds, is not an option for ordinary coins. The Form 1099-DA instructions allow the average basis method only for digital assets that are also tokenized securities eligible under section 1012.

Is HIFO allowed for crypto?

Yes, as a kind of specific identification: you choose the highest-cost units for each sale, one sale at a time or through a standing order.

The regulations give earliest acquired, latest acquired and highest basis as examples of ways to identify units, and say none of them is a method of accounting. Switching from one to another, say from highest cost to earliest acquired, is therefore not an accounting method change that needs IRS consent.

HIFO is a timing tool rather than a tax cut. Selling the dearest units first shrinks today's gain but leaves cheaper units, and bigger gains, for later. It can also pick a unit held for less than a year when an older one would have qualified for long-term rates, so the lowest gain is not always the lowest tax. A mixed rule, such as highest cost among units held more than a year, is still a valid specific identification if it is set before the sale and your records show it.

How do the methods compare on the same lots?

On identical lots, the choice of units can turn one sale from a $20,000 gain into a $10,000 loss.

Suppose one broker account holds three units of the same coin: unit A bought on March 1, 2025 for $30,000, unit B on June 15, 2025 for $60,000 and unit C on January 20, 2026 for $45,000, fees included. On October 20, 2026 you sell one unit for $50,000 after fees.

MethodUnit treated as soldBasisGain or lossHolding periodBasis left in the other two units
FIFO, the defaultA$30,000$20,000 gainLong-term$105,000
Specific identification, latest first (LIFO)C$45,000$5,000 gainShort-term$90,000
Specific identification, highest cost first (HIFO)B$60,000$10,000 lossLong-term$75,000

Worked example: Federal tax on the same $50,000 sale under three methods

Assume a single filer in the 24% bracket, which puts long-term gains at 15%, with no other capital gains or losses in 2026.

  • FIFO: $20,000 long-term gain × 15% = $3,000 of tax.
  • LIFO: $5,000 short-term gain × 24% = $1,200 of tax.
  • HIFO: a $10,000 long-term loss. The loss limit is $3,000 a year against ordinary income ($1,500 if married filing separately), so $3,000 is deducted, saving $720 at 24%, and the other $7,000 carries forward to 2027.

HIFO wins this year, but the two units it leaves behind carry $30,000 less basis than under FIFO. If all three units end up sold at $50,000, the total gain is $15,000 whichever method you use: $150,000 of proceeds minus $135,000 of cost. The method changes when that gain is taxed and at which rate, not its size.

What was the Rev. Proc. 2024-28 safe harbor?

It was a one-time chance to assign the basis of coins held before 2025 to the wallets and accounts holding them at the start of January 1, 2025.

The revenue procedure, issued alongside the final regulations in 2024, calls the old cost figures units of unused basis and the coins still held on that date remaining digital asset units. It let you match the two within each wallet or account, coin type by coin type, so bitcoin and ether were handled separately. There were two ways to do it:

  • Specific unit allocation. You assigned identified basis units, such as those from a September 2020 purchase, to particular wallets. It had to be finished before the earlier of your first sale, disposition or transfer of that coin on or after January 1, 2025 and the due date of your 2025 return, including extensions.
  • Global allocation. A fixed rule, such as highest basis first, assigned to wallet A before wallet B, had to be written in your records before January 1, 2025 and applied by the later of those two dates, leaving no discretion after 2024. Until it was applied, you could identify units sold only through a standing order.

Either way the allocation is irrevocable. It cannot reuse basis already attached to coins sold before 2025, it does not reach coins acquired from January 1, 2025, and it does not prove the basis amounts, which still need records. For a calendar-year individual on extension the 2025 return was due October 15, 2026, so a specific unit allocation can no longer be made. A global allocation remains possible only if its rule was written down before 2025 and you have not sold or moved that coin since. Without an allocation, each wallet's basis has to rest on records of the coins actually held there.

Worked example: The IRS's own allocation example

On December 1, 2024 you hold 10 units of a coin in wallet X, bought in July 2019 at $1 each, and 20 units in wallet Y, bought in September 2020 at $5 each. You sell 6 units from wallet X but, pooling across wallets, give them the $5 basis of six September 2020 units.

  • Going into 2025 you hold 24 units: 4 in wallet X and 20 in wallet Y.
  • You also have 24 units of unused basis: ten at $1 and fourteen at $5, $80 in all.
  • Before your first 2025 sale you allocate two $1 units and two $5 units to wallet X, $12, and the other eight $1 units and twelve $5 units to wallet Y, $68.
  • Selling 2 units from wallet X on March 1, 2025, identified as one $1 unit and one $5 unit, gives that sale a basis of $6.

The coins physically left in wallet X came from the 2019 purchase, yet the pooled 2024 sale had used up six of the $5 basis units. The safe harbor let the leftover $80 of basis be spread over the 24 coins actually held.

How do standing orders with a broker work?

A standing order is a lasting instruction, such as highest cost first, that the broker applies to each sale until you change it.

The regulations treat a standing order as an adequate identification made at the time of each sale. If a broker offers only one way to pick units, that method is treated as your standing order, so the choice of platform can decide your method. Set the order before the sales it should cover, keep a dated copy and check trade confirmations, because the units a broker reports on Form 1099-DA should follow the order. During the relief period you may instead record a standing order in your own books before the sales it covers; from 2027 it has to be given to the broker.

What are the risks of getting cost basis wrong?

The costliest mistakes are a missing basis, which turns the entire sale price into taxable gain, and a basis you cannot prove if the IRS asks.

  • Lost records. Platforms close and data exports disappear. For gifted coins, the IRS says your basis is zero if you cannot document the giver's basis.
  • Late identification. A choice recorded after the sale does not count, and the default FIFO order applies instead.
  • Pooling across wallets. Treating all your coins as one pile was common before 2025 but does not work for sales since then.
  • Chasing the lowest gain. HIFO defers gains and can produce short-term sales; it does not shrink the total gain over the life of a position.
  • Volatile prices. Crypto prices swing widely and a coin can lose most or all of its value, so a method chosen for one sale can look different after the next move.
  • Changing law. H.R. 10357, which the House Ways and Means Committee approved in September 2026, would let holders elect a yearly mark-to-market style calculation for widely traded coins, with every result short-term. It had not passed the House as of November 2, 2026.

The basis rules for digital assets were rewritten for 2025 and have been adjusted by IRS notices since, so confirm the guidance that applies to your filing year and get a tax professional's help with large or tangled histories. The crypto profit calculator works out a single trade's result after fees, crypto tax-loss harvesting shows how high-cost lots feed loss sales, and crypto capital gains tax basics covers how gains are taxed. Planning to cash out? See how to sell crypto and withdraw.

Frequently asked questions

Can I use average cost for crypto?+

Not for ordinary coins. The IRS allows the average basis method only for digital assets that are also tokenized securities eligible under section 1012, so coins use specific identification or first in, first out.

What is my basis in crypto I received as pay or rewards?+

It is the fair market value in dollars that you counted as income when you received the coins. That figure becomes the basis you subtract when you later sell or swap them.

What if I have no record of what I paid?+

Rebuild it from exchange statements, bank records and blockchain data. The Rev. Proc. 2024-28 safe harbor never proved basis amounts, and for gifted coins the IRS treats undocumented basis as zero.

Does moving crypto between my own wallets change its basis?+

No. The units keep their original basis and purchase dates, and the move is not a sale. A network fee paid in crypto, though, is a disposition of the units used to pay it.

Can I change methods from one sale to the next?+

Yes. The regulations say that identifying units by earliest acquired, latest acquired or highest basis is not a method of accounting, so a switch needs no IRS consent, as long as each choice is made before its sale.

Sources

  1. 26 CFR 1.1012-1: Basis of property (paragraphs (h) and (j), digital assets), Electronic Code of Federal Regulations
  2. Revenue Procedure 2024-28: Safe harbor for allocating unused basis of digital assets, Internal Revenue Service
  3. Notice 2025-7: Temporary Relief under Section 1.1012-1(j)(3)(ii), Internal Revenue Service
  4. Frequently asked questions on virtual currency transactions, Internal Revenue Service
  5. Digital assets, Internal Revenue Service
  6. Instructions for Form 1099-DA (2026), Internal Revenue Service
  7. Description of H.R. 10357, the Digital Asset Tax Certainty Act (JCX-47-26), Joint Committee on Taxation, via Congress.gov
  8. Notice 2026-20: Extension of Temporary Relief under Section 1.1012-1(j)(3)(ii), Internal Revenue Service
  9. Topic no. 409, Capital gains and losses, IRS

Related guides