Skip to main content
EverydayToolsSIMPLE • FREE • FAST
HomeCategories
Search tools...
  1. Home
  2. Cryptocurrency
  3. Crypto Cost Basis Calculator
Advertisement
Loading...
Advertisement
Loading...

Track your crypto purchase lots, compare cost basis methods, and calculate real gains.

Understanding your cryptocurrency cost basis is one of the most important — and most confusing — aspects of crypto investing. Whether you hold Bitcoin, Ethereum, Solana, or any other digital asset, knowing your average cost basis tells you exactly how much you paid per coin, what your break-even price is, and whether you are sitting on an unrealized gain or loss. The Crypto Cost Basis Calculator on EverydayTools.io lets you enter multiple purchase lots — each with its own date, price per unit, quantity, and transaction fee — and instantly calculates your portfolio-wide average cost basis. This is essential for tax reporting, position management, and strategic selling decisions. Cost basis matters enormously at tax time. In the United States, the IRS requires crypto investors to report capital gains and losses on every taxable disposal. The cost basis method you choose — First-In-First-Out (FIFO), Last-In-First-Out (LIFO), Highest-In-First-Out (HIFO), or Weighted Average Cost — determines how much of your gain is taxable and at what rate. FIFO is the IRS default for crypto, but Specific Identification (selecting exactly which lot you are selling) is allowed with proper contemporaneous records. Since January 1, 2025, the IRS mandates per-wallet cost basis tracking under Revenue Procedure 2024-28. This means you can no longer pool cost basis across different exchanges or wallets — the basis for a disposal must come from the same account where the crypto was held. Our calculator works with manual lot entry, which is the correct approach for per-wallet tracking. This tool serves two modes. In Cost Basis Mode, you enter your purchase lots and a current market price, and immediately see your average cost basis, total invested, total units held, break-even price, current portfolio value, and unrealized gain or loss percentage. In Realized Gain Mode, you additionally enter a sale price, quantity sold, sale date, and any sale transaction fee — the tool then applies your chosen cost basis method to determine your realized capital gain or loss, classifies it as short-term (under 365 days) or long-term (over 365 days), and displays a side-by-side method comparison so you can see which approach is most favorable. Transaction fees — including exchange fees and blockchain gas fees — are included in your cost basis, which increases your basis and can reduce your taxable gain. This is an often-overlooked but legally correct treatment of fees under IRS guidance. The method comparison feature is particularly powerful. For any given disposal, you can instantly see what your realized gain or loss would be under FIFO, LIFO, HIFO, and Average Cost, displayed as a visual bar chart. In a rising market, HIFO typically produces the smallest taxable gain (by matching your highest-cost lots first), which is why many crypto-savvy investors use it with proper Specific Identification documentation.

Understanding Crypto Cost Basis

What Is Cost Basis?

Cost basis is the original value of an asset for tax purposes — essentially, what you paid for it including any fees. For cryptocurrency, your cost basis per unit equals the purchase price plus any transaction fees divided by the number of units acquired. If you bought 1 BTC for $30,000 with a $15 exchange fee, your cost basis is $30,015 for 1 BTC, or $30,015 per BTC. When you hold multiple purchase lots at different prices over time — a common scenario for dollar-cost averaging investors — your overall average cost basis is the weighted average across all lots. This average cost basis is compared to your current price or sale price to determine your gain or loss.

How Is Cost Basis Calculated?

For each purchase lot: Lot Cost Basis = (Price Per Unit × Quantity) + Transaction Fee. Average Cost Basis Per Unit = Total Invested ÷ Total Units Held. For realized gains: Adjusted Proceeds = (Sale Price × Quantity Sold) − Sale Fee. Realized Gain/Loss = Adjusted Proceeds − Cost Basis of Sold Units. The cost basis of sold units depends on the method: FIFO uses the oldest lots first, LIFO uses the newest, HIFO uses the highest-priced lots first (minimizing taxable gain in a rising market), Average Cost uses the weighted average price per unit, and Specific ID uses the exact lots you designate. Holding period is calculated as Sale Date minus Purchase Date — over 365 days qualifies for long-term capital gains tax rates.

Why Does Cost Basis Matter for Crypto Taxes?

In the US, every disposal of cryptocurrency — selling, trading, spending, or gifting — is a taxable event requiring you to report capital gains or losses. The method you choose to calculate cost basis directly determines your tax bill. In a rising market, HIFO can dramatically reduce your taxable gain compared to FIFO. Long-term gains (assets held over a year) are taxed at preferential rates of 0%, 15%, or 20%, while short-term gains are taxed as ordinary income, which can be as high as 37%. Accurate cost basis tracking with fees included is legally required and can save you thousands of dollars by correctly reducing your gains.

Limitations and Important Caveats

This calculator is an educational planning tool, not a tax filing service. Key limitations to understand: (1) Average Cost Basis is NOT IRS-approved for US cryptocurrency — it is allowed in Canada and the UK, but US investors using average cost risk IRS scrutiny. (2) LIFO and HIFO require Specific Identification documentation — you must maintain contemporaneous records designating which lots you sold at the time of the transaction, not retroactively. (3) Per-wallet tracking has been mandatory since January 2025 — you cannot mix cost basis across wallets. (4) Special transactions like airdrops, staking rewards, mining income, and hard forks have different cost basis rules (typically FMV at receipt). Always consult a qualified crypto tax professional for your specific situation.

How to Use the Crypto Cost Basis Calculator

1

Choose Your Mode

Select 'Cost Basis Mode' to calculate your average cost basis and unrealized gain/loss, or 'Realized Gain Mode' if you have already sold some crypto and want to calculate your realized capital gain or loss.

2

Enter Your Purchase Lots

Add each purchase separately as a lot: enter the purchase date, price per unit at the time of purchase, quantity bought, and any transaction fee (exchange fee or gas fee). Click 'Add Lot' to enter additional purchases. The more lots you enter, the more accurate your average cost basis will be.

3

Set Current Price and Cost Basis Method

Enter the current market price per unit for your cryptocurrency. Then select your preferred cost basis method — FIFO is the IRS default, HIFO minimizes taxable gain in rising markets, and Specific ID lets you choose exactly which lots were sold. Results update instantly.

4

Review Results and Export

In Realized Gain Mode, also enter your sale price, quantity sold, sale date, and sale fee to see your realized gain/loss, holding period classification, and side-by-side method comparison. Export your lot table as CSV for tax records, print results, or copy them to your clipboard.

Frequently Asked Questions

What cost basis method should I use for cryptocurrency in the US?

The IRS default method for cryptocurrency is FIFO (First-In, First-Out). You may also use Specific Identification — selecting exactly which lots you sold — if you maintain contemporaneous records at the time of each sale, not retroactively. HIFO (Highest-In, First-Out) is technically permissible as a form of Specific ID and often minimizes your taxable gain in a rising market, but requires proper documentation. LIFO and Average Cost are generally not accepted by the IRS for cryptocurrency, though Average Cost is allowed in Canada and the UK. When in doubt, consult a crypto-specialized CPA.

How are transaction fees treated in cost basis?

Transaction fees paid when acquiring cryptocurrency — exchange fees, gas fees, brokerage charges — are added to your cost basis. This increases your cost basis and therefore reduces your taxable gain when you sell. For example, if you bought 1 ETH at $2,000 and paid $15 in gas, your cost basis is $2,015, not $2,000. Similarly, sale transaction fees reduce your gross proceeds — your net proceeds (used to calculate gain) equal the sale price minus any sale fees. Always track fees per transaction for accurate cost basis calculations.

What is the difference between short-term and long-term crypto gains?

The holding period determines the tax rate applied to your crypto gain. If you held the cryptocurrency for 365 days or less before selling, any gain is short-term and taxed as ordinary income — at your marginal income tax rate, which can be up to 37% in the US. If you held for more than 365 days, the gain is long-term and taxed at preferential capital gains rates of 0%, 15%, or 20% depending on your income. Choosing which lots to sell using Specific Identification can allow you to select long-term lots to benefit from lower rates, which is one reason HIFO and Specific ID are popular strategies.

What is the IRS per-wallet tracking requirement for 2025?

Starting January 1, 2025, under IRS Revenue Procedure 2024-28, crypto investors must track cost basis on a per-wallet or per-account basis. This means you can no longer pool cost basis across different exchanges or wallets. When you sell from Exchange A, you must use the cost basis of cryptocurrency originally acquired on Exchange A — you cannot use the cost basis of cheaper coins held on Exchange B. This makes detailed lot-by-lot records even more important. Our calculator supports per-wallet tracking by letting you enter lots independently for each wallet or account.

What is the cost basis for airdrops, staking rewards, and mining income?

Special transaction types have different cost basis rules. Airdrops are treated as income at their fair market value (FMV) on the date you gain control of the tokens — this FMV becomes your cost basis. Staking rewards and mining income are also treated as ordinary income at FMV when received, and that FMV becomes the cost basis for future sales. Hard fork coins have a cost basis equal to the FMV when you first gain access to the new coins. Gifts received use the donor's original cost basis (if the FMV at the time of the gift was higher), subject to special rules. Always consult IRS guidance or a tax professional for these special situations.

Why does HIFO result in a lower capital gain than FIFO?

In a generally rising crypto market, the lots you bought earliest (FIFO) tend to have the lowest purchase price, which means they have the largest unrealized gain. Selling oldest lots first (FIFO) maximizes your taxable gain. HIFO, by contrast, matches your highest-priced lots to the current sale first — these lots have the smallest unrealized gain (since you paid more for them), resulting in the lowest taxable capital gain or even a capital loss. Using HIFO with proper Specific Identification documentation is a legal tax minimization strategy. However, it requires maintaining precise records of which exact lots you designated at the time of each sale.

EverydayToolsSIMPLE • FREE • FAST

Free online tools for non-IT professionals. Calculators, converters, generators, and more.

Popular Categories

  • Health Calculators
  • Finance Calculators
  • Conversion Tools
  • Math Calculators

Company

  • About
  • Contact
  • Privacy Policy
  • Terms of Service

© 2026 EverydayTools.io. All rights reserved.