Crypto Cost Basis Calculator
How to work out your crypto cost basis across multiple purchases — the FIFO and specific-ID rules, and the tools available today.
Updated July 2026 · Educational only, not tax advice
An interactive multi-lot calculator is in progress
This page explains how crypto cost basis is calculated when you have bought the same coin at different prices over time. A full interactive tool — enter each purchase as a row, pick FIFO or specific identification, and get the consumed cost basis for a sale — is in progress. Until it ships, use the two resources below.
How to calculate crypto cost basis with multiple lots
Cost basis is what you paid for a coin, including fees. When every purchase happened at the same price it is simple arithmetic. The real question is which lot you are selling from when you have bought the same coin repeatedly at different prices — that choice changes your taxable gain.
Since IRS Rev. Proc. 2024-28 took effect, only two methods are allowed. FIFO (First In, First Out) always treats your oldest purchase as the one you sold. Specific identification lets you designate exactly which lot a sale came from — most often used as HIFO (Highest In, First Out), selling the highest-cost lot first to minimize the taxable gain. Both methods must now be tracked separately for each wallet or exchange account; you can no longer pool basis across every wallet you own and pick whichever lot gives the best result after the fact.
Working this out by hand means listing every purchase (date, quantity, price, fee), picking a method, and running the consumption math against your disposal quantity. It gets tedious fast with more than a handful of lots — which is exactly the gap the calculator in progress is built to close.
Frequently asked questions
What is crypto cost basis?
Crypto cost basis is the total US-dollar amount you paid for a coin, including any fees — the number the IRS subtracts from your proceeds to find your taxable gain or loss on a sale, swap, or spend. Under IRS Notice 2014-21, crypto is property, so every disposal needs a cost-basis figure.
How do I calculate cost basis when I bought crypto at different prices?
Since IRS Rev. Proc. 2024-28 took effect for 2025 tax years, you can only use two methods: First In, First Out (FIFO), where the coins you bought first are treated as the ones you sold first, or Specific Identification, where you (or your software) identify exactly which purchase lot a given sale came from — Highest In, First Out (HIFO) is the most common specific-ID variant, since selling your highest-cost lots first usually minimizes the taxable gain. Both methods must now be tracked separately per wallet or account; you can no longer pool cost basis across every wallet you own and pick whichever lot gives the best outcome after the fact.
What's the difference between FIFO and HIFO for crypto taxes?
FIFO always consumes your oldest lots first, regardless of what you paid for them. HIFO (a form of specific identification) lets you consume your highest-cost lots first, which usually produces a smaller taxable gain — or a larger deductible loss — on any given sale. FIFO is simpler to track by hand; HIFO generally requires software or careful manual records, since you must be able to show which specific lot you sold.
Can I switch cost-basis methods between tax years?
You generally need to pick a method and identify it at the time of each sale, not retroactively after seeing which one saves more tax. Rev. Proc. 2024-28 requires the identification to happen at or before the time of the transaction (or by a safe-harbor default if you don't specify). This is educational only, not tax advice — a tax professional can confirm how a method change applies to your specific filing history.
Does an interactive cost-basis calculator exist on this page yet?
Not yet — this page currently explains the FIFO / specific-ID rules and links to the closest tools available today. A full multi-lot calculator (enter each purchase as a row, pick FIFO or specific-ID, and get the consumed cost basis for a disposal) is in progress. In the meantime, PipeFlare's crypto tax calculator estimates the tax owed once you already know your cost-basis figure for a single lot.
Do exchange or network fees count toward cost basis?
Yes. A fee paid when you buy crypto is added to your cost basis, and a fee paid when you sell or swap it is subtracted from your proceeds — either way it lowers your taxable gain. Keep records of every fee alongside the purchase price.
Sources
More on crypto taxes
Form 8949, loss harvesting, NFTs, DeFi, and airdrops — all explained.