Most people think the tax on a crypto sale depends on the price they sold at. It does, but that is only half the subtraction. The other half is basis, and basis is where crypto returns are won or lost.
Two people can sell the same coin, on the same day, at the same price, and owe very different amounts of tax. The difference is which units each of them sold, and what those units cost. That choice is governed by a short set of rules in the Treasury regulations, and since January 1, 2025, those rules are stricter than most software was built for.
This guide explains the methods the rules actually allow, how they apply to exchange accounts and self-custody wallets, and how to pick a method on purpose instead of by accident.
What basis is and why it decides your tax
Basis is generally what you paid for something. For crypto bought with dollars, Treas. Reg. 1.1012-1(h)(1)(i) says basis is the cash you paid plus any allocable digital asset transaction costs. Your gain or loss on a sale is the amount you realize minus that adjusted basis.
Crypto you received as income has a basis too. Notice 2014-21, Q&A-4, says crypto received as payment for goods or services takes a basis equal to its fair market value in dollars when you received it. Rev. Rul. 2019-24 applies the same logic to an airdrop after a hard fork: the amount you included in income becomes your basis. Staking rewards follow the same pattern, because Rev. Rul. 2023-14 requires you to include their value in income when you gain dominion and control. If you reported the income, you have basis. If you forget the basis, you pay tax on the same dollars twice.
Here is the part most people miss. When you hold units of the same coin bought at different times and prices, the IRS needs to know which units left your hands. The answer sets both the basis and the holding period, and the holding period decides whether the gain is short-term or long-term. See the holding period guide for that half of the problem.
The two methods the regulations recognize
Treas. Reg. 1.1012-1(j) recognizes two ways to decide which units you sold, exchanged or transferred.
- Specific identification. You choose the units, by reference to an identifier such as purchase date and time or purchase price, and you do it no later than the date and time of the sale.
- First in, first out. If you do not make a valid specific identification, the units are treated as disposed of in order of time, starting with the earliest units of that same asset you acquired.
That is the whole menu. Names like HIFO (highest in, first out) and LIFO (last in, first out) are not separate methods. They are ways of making a specific identification. The regulation says so directly in 1.1012-1(j)(4): picking units by earliest acquired, latest acquired or highest basis is a way of specifically identifying units, and it is not a method of accounting. That matters, because it means changing from one approach to another is not an accounting method change that needs IRS consent.
It also means HIFO only works if the identification is actually made, on time, in the way the regulation requires. Telling your software after the year ends that you would like HIFO results is not an identification. It is a wish.
Wallet by wallet, starting January 1, 2025
Before 2025, many taxpayers and software tools treated all of a person's units of a coin as one big pool, no matter which wallet or exchange held them. The older IRS FAQs did not expressly limit identification to a single wallet, and a universal approach grew up around that silence.
That ended with the final regulations. Treas. Reg. 1.1012-1(j)(6) applies the identification rules to all acquisitions and dispositions on or after January 1, 2025, and the rules work wallet by wallet and account by account. A sale from your exchange account is matched against units in that exchange account. A sale from your hardware wallet is matched against units in that hardware wallet.
If you held crypto on December 31, 2024, the IRS gave you a transition path in Rev. Proc. 2024-28 to assign your leftover basis to specific wallets. The deadlines in that revenue procedure are real, and some have already passed. The Rev. Proc. 2024-28 guide walks through it.
Units in a self-custody wallet
For units not held by a broker, such as a hardware wallet or a browser wallet you control, Treas. Reg. 1.1012-1(j)(1) and (2) apply. You make a specific identification by recording on your own books and records, no later than the date and time of the sale, which units are going out. The identifier can be purchase date and time or purchase price, as long as it is enough to pin down the units.
There is a condition. A specific identification can be made only if you keep adequate records for the units in that wallet, enough to show that a unit you identify was actually removed from the wallet. Records are not a nicety here. They are the price of admission. See the crypto record-keeping guide.
If you do not make a specific identification, the units in that wallet are treated as leaving in order of time from the earliest acquisition date. One detail catches people: the date you moved units into the wallet is disregarded. A coin you bought in 2021 and moved to a new wallet in 2025 still carries its 2021 acquisition date for ordering purposes.
Units held by a broker
For units held in the custody of a broker, such as a centralized exchange, Treas. Reg. 1.1012-1(j)(3) applies. The normal rule is that you make an adequate identification by telling the broker, no later than the date and time of the sale, which units to sell, using an identifier the broker designates as specific enough.
A standing order or instruction counts as an adequate identification made at the time of sale. And if a broker offers only one method of specific identification, the regulation treats that method as your standing order. Without an adequate identification, FIFO applies to the units in that broker account.
Many brokers were not ready to accept identifications when the rules took effect. The IRS responded with temporary relief in Notice 2025-7 for 2025, and Notice 2026-20 extended that relief through December 31, 2026. During the relief period you can make the identification, or record a standing order, in your own books and records instead of communicating it to the broker. The details are in the specific identification guide.
What about average cost?
Investors who own mutual funds are used to average basis. For crypto, the regulation mentions average basis only in a narrow way: an election to use average basis for a covered security for which average basis reporting is permitted, and that is also a digital asset, counts as an adequate identification. For ordinary tokens held at an exchange or in your own wallet, the working choices are specific identification or FIFO.
A worked example
Assume you hold two units of the same coin in one exchange account. You bought the first unit in March 2021 for $20,000. You bought the second in April 2024 for $60,000. In June 2026 you sell one unit for $50,000, and assume no transaction costs to keep the math clean.
- Under FIFO, the 2021 unit is treated as sold. Your gain is $30,000 ($50,000 minus $20,000), and it is long-term.
- With a timely specific identification of the 2024 unit, your result is a $10,000 loss ($50,000 minus $60,000). Because you held that unit more than one year, it is a long-term capital loss.
Same coin, same sale, same day. One answer produces a $30,000 gain and the other a $10,000 loss. That is a $40,000 swing in reported income, and it is entirely about which unit you identified and whether you did it in time.
Specific identification does not erase the gain forever. The low-basis 2021 unit is still sitting in the account, and it will produce its gain when you sell it. What specific identification gives you is control over timing and character, which is exactly what planning is.
Choosing a method on purpose
There is no single right method. Highest basis first tends to defer gain. Earliest acquired first tends to produce long-term treatment. Sometimes you want to realize gain, for example to use up a loss carryforward or to fill a low bracket; the gain harvesting guide covers that.
Because the method of identification is not a method of accounting, you can make different choices in different years, or even different sales, as long as each identification is valid when made. Consistency is not required. Timeliness and records are.
Where people get this wrong
- Running software on a universal pool for 2025 and later sales. The regulations require wallet-by-wallet matching.
- Forgetting income lots. Staking rewards, airdrops and crypto received for work all have basis equal to the income you reported.
- Assuming the broker's Form 1099-DA basis controls. Notice 2026-20 says plainly that, during the relief period, the basis a broker reports may not match the lots you properly identified in your own records. Your valid identification controls your tax; you just have to report the difference correctly. See Form 1099-DA explained.
- Choosing units after the fact. An identification made after the date and time of sale is not an identification.
What to do this year
Write down a standing instruction for every wallet you control and every exchange account, and date it before your next sale. Keep acquisition records for every lot. Reconcile your records against each broker statement before you file. And if you hold old coins that were never assigned to a wallet under Rev. Proc. 2024-28, get that sorted before the next disposition, not after.
Basis is the number you control. Control it.
Frequently asked questions
Is FIFO required for crypto?
FIFO is the default under Treas. Reg. 1.1012-1(j) when you do not make a valid specific identification. You may specifically identify units instead, as long as you do it no later than the date and time of the sale and keep adequate records.
Can I use HIFO for crypto?
Yes, as a way of specifically identifying units. The regulation treats choosing the highest basis units as a form of specific identification, not a separate method, so it only works if the identification is made on time and documented.
Can I switch methods from year to year?
Yes. Treas. Reg. 1.1012-1(j)(4) says the way you specifically identify units, for example earliest acquired or highest basis, is not a method of accounting, so changing it is not an accounting method change.
Does the universal pooling method still work?
Not for acquisitions and dispositions on or after January 1, 2025. The final regulations apply identification wallet by wallet and account by account. Rev. Proc. 2024-28 provided a transition for basis held as of January 1, 2025.
What basis do staking rewards have?
Generally the fair market value you included in income when you gained dominion and control of the rewards, under Rev. Rul. 2023-14 and the general rule that property received as income takes a basis equal to the amount included.
Want a second set of eyes on your crypto return?
Bring the exchange exports, the wallet addresses and the questions. The first consultation is free and the conversation is privileged.