Crypto · three ways to count the same sale
Crypto Cost Basis Calculator
Short answer
Selling 1 coin at $90,000 on 2025-11-14 from the sample lots shows a FIFO gain of $60,000 (long-term), a LIFO gain of $30,000 (short-term), and a HIFO gain of $12,500 (short-term). This is for someone who already sold and wants the three methods side by side. US rules since 2025 require basis by wallet, and starting with 2026 sales your exchange reports basis only for coins bought and kept there since January 1, 2026. This does not file taxes. Last reviewed: November 20, 2026 by The Cash Flow Scout. Educational only. Not financial advice.
Last reviewed: November 2026. Illustration, not a forecast.
Cost basis calculator
This calculator answers the gain under FIFO, LIFO, and HIFO for one sale against the lots you type. It is for someone checking a sale before they talk to a tax pro. The sample is three lots and a sale of one coin. The honest catch: the smallest gain can still be the expensive one if it is short-term. Educational only. Not financial advice.
How to use this calculator
- Start from the sample, or replace the rows. Each lot needs a label, a YYYY-MM-DD date, a quantity, and a price.
- Type the coins sold, the sale price, and the sale date. The example is 1 coin at $90,000 on 2025-11-14.
- Read the three gains. The lowest one is outlined. Check whether that method is short-term.
- Open the lot table to see which slices each method consumed.
- Export a CSV if you want a copy. Import only replaces the rows when every row is valid.
- Keep wallet records at the time of the sale. This page will not file anything, and nothing is uploaded.
What the numbers mean
- FIFO
- Basis $30,000 from lot A. Gain $60,000. Long-term. The lot date is 2021-03-10, which is 1,710 days before the sale.
- LIFO
- Basis $60,000 from lot C. Gain $30,000. Short-term. Lot C is 166 days old on the sale date.
- HIFO
- Basis $77,500 from 0.5 of lot B and 0.5 of lot C. Gain $12,500. Short-term, because both slices are under 365 days.
- Term
- Long-term only if the gap is over 365 UTC days. One short-term slice makes the method short-term for the note.
Worked example: sell 1 coin
Lot A is 1 coin at $30,000 on 2021-03-10. Lot B is 0.5 at $95,000 on 2025-01-15. Lot C is 1 at $60,000 on 2025-06-01. The sale is 1 coin at $90,000 on 2025-11-14. Proceeds are $90,000. Gain is proceeds minus the basis of the slices the method uses.
FIFO sorts by date, oldest first, and uses all of lot A. Basis is $30,000. Gain is $60,000. The holding period is 1,710 days, so that slice is long-term, and the method is long-term.
LIFO sorts newest first and uses lot C. Basis is $60,000. Gain is $30,000. The holding period is 166 days, so the method is short-term. HIFO sorts by price, highest first. It takes 0.5 from lot B ($47,500 of basis) and 0.5 from lot C ($30,000 of basis). Basis is $77,500. Gain is $12,500. Lot B is 303 days old. Both slices are short-term, so HIFO is short-term. HIFO is the lowest gain, and it is outlined for that reason only.
Will Form 1099-DA show my crypto cost basis in 2026?
Only for covered coins. Starting with 2026 sales, a broker must report basis for crypto bought on or after January 1, 2026 in a custodial account and sold from that same account. Coins bought before 2026, or moved in from another wallet or exchange, are noncovered. The form may show proceeds with no basis, and supplying it is your job.
| Sale | What the form shows | What you still do |
|---|---|---|
| 2025 sales | Gross proceeds only | Supply basis for every sale from your records |
| 2026 sales, covered (bought in 2026 on that exchange and never moved) | Proceeds and basis | Confirm the basis matches the lots you meant to sell |
| 2026 sales, noncovered (bought before 2026 or transferred in) | Proceeds; basis optional with box 9 checked | Supply basis wallet by wallet, the way this calculator lays out lots |
Lot choice has a 2026 wrinkle too. IRS Notice 2026-20 extended the temporary relief from Notice 2025-7 through December 31, 2026, so you can still identify which units you sold with methods such as a standing order kept in your own records while brokers finish their systems. Skip the identification and the default is FIFO inside that wallet or account. The notice also warns that the basis on a 2026 broker form may not match the lots on your own books, which is exactly why the records below matter.
Sources: IRS Instructions for Form 1099-DA (2026), IRS Notice 2026-20.
How is crypto taxed when you sell in 2026?
By holding period. Crypto held one year or less is a short-term gain taxed at your ordinary rate, from 10% to 37%. Held more than a year, it is long-term and taxed at 0%, 15%, or 20%. For 2026 the 0% rate covers taxable income up to $49,450 for a single filer and $98,900 for a married couple filing jointly.
| Method | Gain | Term | Rate used | Illustrative federal tax |
|---|---|---|---|---|
| FIFO | $60,000 | Long-term | 15% | $9,000 |
| LIFO | $30,000 | Short-term | 24% | $7,200 |
| HIFO | $12,500 | Short-term | 24% | $3,000 |
On this sample, the smallest gain is also the smallest bill, even at the higher short-term rate. That is not a law of nature. A retiree with low taxable income might fit the whole $60,000 FIFO gain into the 0% bracket and owe nothing federally, which would make the "worst" method the best one. State tax and the 3.8% net investment income tax can change the picture again. The wash sale rule does not apply to crypto held directly as of November 2026, so harvesting a loss and buying back is still allowed; the crypto tax-loss harvesting calculator shows what a harvested loss is worth.
Sources: IRS Rev. Proc. 2025-32 (2026 brackets), IRS Topic 409, capital gains. Not tax advice.
FIFO, LIFO, and HIFO
The three methods see the same lots and the same sale. Only the order changes. FIFO walks dates from old to new. LIFO walks dates from new to old. HIFO walks prices from high to low, and uses the older date when two prices match. A lot can be split. HIFO does that on the sample because the highest lot is only 0.5 coin.
The bar chart stacks long-term gain and short-term gain. On the sample, FIFO is entirely long-term, and LIFO and HIFO are entirely short-term. The stack adds up to the gain you see on the card. A later sale that mixes a 2021 lot with a 2025 lot will show both colors on one bar.
The table under the chart is the second view: the actual slices, with quantity, price, basis, term, and gain. If the sale is larger than the lots, every method stops when the coins run out. The page says so. It does not invent basis.
Long-term means more than 365 days
The test is strict. Count UTC days from the lot date to the sale date. More than 365 is long-term. Exactly 365 is short-term. A date the page cannot read is treated as short-term, so a typo does not quietly become the kinder rate.
One short-term slice is enough to mark the method short-term in the hero note. The chart still splits the dollars. You can have a long-term gain and a short-term loss inside one method. The note stays short-term because any short-term slice is in the sale.
Tax rates differ, and they change. This helper stops at the gain and the term. It does not apply a percent, and it does not know a loss you harvested somewhere else. A smaller short-term gain can cost more than a larger long-term gain. Look at the term before you treat the outline as a winner.
Wallets and records
US rules since 2025 require basis by wallet. Specific identification needs records at the time of sale. This does not file taxes. Nothing is uploaded. If you want HIFO, or any lot other than a default order, the record has to exist when you sell, not when you build a spreadsheet next spring.
The lots you edit can be saved in this browser. The storage key is local. A shared link includes the lot list only when it differs from the sample. A bad CSV, a bad paste, or a bad lot string in a link does not wipe the rows already on the page.
Do not paste lots from two wallets into one list and call it done. Run them separately. The calculator will not ask which wallet a row came from, because you did not give it a column for that. Add that fact to your own records.
Frequently asked questions
What do FIFO, LIFO, and HIFO do on this page?
FIFO sells the oldest lots first. LIFO sells the newest first. HIFO sells the highest price first. On the sample, a sale of 1 coin at $90,000 on 2025-11-14 gives a FIFO gain of $60,000 from lot A, a LIFO gain of $30,000 from lot C, and a HIFO gain of $12,500 from half of lot B and half of lot C. Educational only. Not financial advice.
Which gain is long-term?
A slice is long-term only when the sale date is more than 365 UTC days after the lot date. Exactly 365 days is still short-term. Lot A is 1,710 days, so FIFO is long-term. Lot B is 303 days and lot C is 166 days, so LIFO and HIFO are short-term. If any slice in a method is short-term, the method note says short-term.
Does the lowest gain mean the lowest tax?
Not always. HIFO is the lowest gain on the sample, and it is short-term. In a 24% bracket with a 15% long-term rate, HIFO tax is about $3,000, LIFO about $7,200, and FIFO about $9,000, so HIFO wins here. If the FIFO gain fit in the 0% long-term bracket, FIFO could win instead. This page does not know your bracket, and it does not file taxes.
Will Form 1099-DA show my crypto cost basis?
Only for covered assets. For 2025 sales the form shows gross proceeds only. Starting with 2026 sales, brokers must report basis for crypto bought on or after January 1, 2026 in the same custodial account and sold there. Coins bought earlier or moved in from another wallet are noncovered, and you supply the basis.
Does the wash sale rule apply to crypto in 2026?
Not to crypto you hold directly, as of November 2026. The wash sale rule in IRC section 1091 covers stock and securities, and the IRS treats crypto as property. Bills to extend it to digital assets have been proposed but are not law. Crypto ETFs and other securities are a different story.
What about basis by wallet?
US rules since 2025 require basis by wallet. Specific identification needs records at the time of sale. This helper treats the lots you type as one list. If those lots live in more than one wallet, do not mix them and pretend the result is a return. Nothing is uploaded.
How do I import a CSV?
Use a header of label, date, qty, price, then one lot per row, up to 10. You can paste it or pick a file. The file is read on this device. A bad CSV does not replace the rows you already have. The sample link omits the lot list. A custom list is saved in this browser under a local key.
What if I sell more coins than I listed?
The methods consume only the coins on hand. Basis covers that filled quantity, and the page says the sale was larger than the lots. It does not invent a cost for the missing coins. Add the lot, or lower the sell quantity.
Educational only. Not financial advice. Not tax advice. US rules since 2025 require basis by wallet. Specific identification needs records at the time of sale. This does not file taxes. Nothing is uploaded.