Crypto Tools Guide

How to Calculate Your Average Cost Basis in Crypto

A plain-English walkthrough of average cost basis in crypto: the formula, a full worked example, how it compares with FIFO and specific identification, and what fees, staking rewards, and multiple wallets do to your number.

Whether you track purchases by hand or use a calculator, average cost basis always works the same way: total cost divided by total coins.

Buy Bitcoin three times at three different prices, and a simple question gets surprisingly hard to answer: what did you actually pay for it? Your average cost basis is the answer. It's the single number that shows your true average price per coin across every purchase you've made, so you can see your real profit or loss at a glance instead of guessing.

Average cost basis is the total amount you've spent acquiring a cryptocurrency, including fees, divided by the total number of units you currently hold. Buy 1 BTC for $30,000 and later buy another 1 BTC for $50,000, and your average cost basis is $40,000 per BTC, not either individual price on its own.

This number matters for more than curiosity. It's how you tell if you're actually up or down on a position, and it's a building block for tax reporting, even though, as you'll see later, it isn't the method the IRS accepts for US crypto tax filing.

Below, we'll walk through the exact formula, work through a full example by hand, compare average cost with FIFO and specific identification, and cover what fees, staking rewards, and multiple wallets do to your numbers. If you'd rather skip the manual math, 100 Calculator's Crypto Average Cost Basis Calculator does it for you instantly.

What Cost Basis Means in Crypto

Cost basis is an accounting term, but the idea behind it is simple. It's the value you assign to something you own, used to figure out your gain or loss once you eventually sell it.

What "Cost Basis" Actually Means

For a single crypto purchase, cost basis is straightforward: the price you paid, plus any fees the exchange or network charged you to make that purchase. Buy 0.5 ETH for $1,500 and pay a $3 trading fee, and your cost basis for that 0.5 ETH is $1,503, not $1,500.

Cost basis is also different from a coin's market cap, which measures the value of an entire network rather than what you personally paid for your share of it. Our guide on how market cap works digs into that distinction, and our Bitcoin market cap what-if guide shows why price alone doesn't tell the full story.

Every purchase keeps its own price tag until you average them together into one blended cost basis for your whole position.

Why Average Cost Basis Exists

Most people don't buy their crypto in one purchase. You might buy a little on payday, add more during a dip, and pick up more again a few months later. Each purchase has its own price, but your wallet doesn't keep those purchases separate on screen; it just shows one balance.

Average cost basis solves that problem. It blends every purchase into a single, weighted price per coin, so you can look at your whole position and immediately know roughly what you paid for it, instead of mentally averaging a list of old transactions every time you check your portfolio.

One detail worth catching early: it's a weighted average, not a simple average of your purchase prices. Buying 0.1 BTC at $40,000 and then 0.9 BTC at $50,000 doesn't average to $45,000, because the second purchase was nine times larger. It actually works out to $49,000, weighted toward the bigger purchase. The formula in the next section handles this automatically.

Why Tracking Your Average Cost Basis Matters

It's easy to eyeball a portfolio and feel good or bad based on the current price alone. Average cost basis turns that feeling into an actual number.

Knowing Your Real Profit or Loss

If ETH is trading at $3,200 and you own some, that price alone doesn't tell you if you're winning. If your average cost basis is $2,000, you're sitting on a solid gain. If it's $3,800, you're actually down, even though the price "feels" high. Comparing the current price to your average cost basis is the fastest way to see where you really stand, and it's the same logic behind calculating crypto trading profit correctly. Once you know your average cost basis, 100 Calculator's Crypto Profit & Exchange Fee Calculator can turn it into an exact profit figure, fees included.

Making Better Buy and Sell Decisions

Knowing your break-even price changes how you think about buying more or selling. Some investors use their average cost basis as a personal reference point: buying more when the price sits well below it, or taking partial profits once the price moves comfortably above it. That's not a full strategy on its own, but it's a far more grounded starting point than reacting to headlines.

Building Toward Accurate Tax Records

Even though average cost basis isn't the method the IRS accepts for US crypto tax returns, covered in detail later in this guide, the underlying data you collect to calculate it, purchase dates, amounts, prices, and fees, is exactly what you need for FIFO or specific identification too. Track it well once, and you're set up for tax season no matter which method you end up using.

A quick look at what tracking this number actually gives you:

  • A clear, single number for your break-even price on any coin
  • An honest read on profit or loss, not just a feeling based on price alone
  • The raw purchase data you'll need for tax reporting, regardless of method
  • An early warning if a position has drifted further from your comfort zone than you realized
  • A more grounded reference point for deciding when to buy more or take profit

The Average Cost Basis Formula

The math behind average cost basis is genuinely simple, even though tracking the inputs can get tedious once you've made a lot of trades.

The Formula

Average Cost Basis Formula

Average Cost Basis = Total Cost of All Purchases ÷ Total Units Held

Total Cost of All Purchases: every dollar you've spent buying the coin, including fees, added together

Total Units Held: the number of coins or tokens you currently hold that you acquired, not units you've since sold, transferred out, or lost

What Each Part Means

"Total cost" isn't just the sum of your purchase prices. It includes every fee you paid to make those purchases too: exchange trading fees, network or gas fees, and any other cost the platform charged you to complete the buy.

"Total units held" only counts coins you currently own. If you've sold some of your position, those units drop out of both the top and bottom of the formula once you recalculate, which is exactly what the worked example below walks through.

One practical note: crypto purchases often involve several decimal places, like 0.03742 BTC. Keep as much precision as your tracking tool allows. Rounding too early, especially on the unit side, can throw off your average price more than you'd expect on assets priced in the tens of thousands of dollars.

Worked Example: Calculating Average Cost Basis Step by Step

Numbers make this easier to trust than a formula alone. Here's a complete example, start to finish, using three hypothetical Bitcoin purchases. These prices are illustrative for the sake of the math, not a record of real BTC market history.

Three Purchases, One Average Price

Three Bitcoin purchases used in this example
Purchase Date Amount Bought Price per Coin Fee Total Cost
Purchase 1 Jan 5 0.5 BTC $40,000 $15 $20,015
Purchase 2 Mar 12 0.25 BTC $52,000 $10 $13,010
Purchase 3 Jun 20 0.75 BTC $46,000 $20 $34,520

Add up the totals:

  • Total units held: 0.5 + 0.25 + 0.75 = 1.5 BTC
  • Total cost, including fees: $20,015 + $13,010 + $34,520 = $67,545

Then divide total cost by total units:

$67,545 ÷ 1.5 = $45,030

This investor's average cost basis is $45,030 per BTC. That's the number to compare against the current price to see a real gain or loss, and notice it's different from any single purchase price in the table above, which is exactly the point of averaging across all three.

Free Online Tool

Rather skip the manual math?

100 Calculator's Crypto Average Cost Basis Calculator runs this exact calculation for you. Add each purchase, including fees, and it returns your average cost basis instantly, along with your current gain or loss once you enter today's price.

Average Cost vs FIFO vs Specific Identification

Average cost basis is useful for understanding your overall position, but when you actually sell part of your holdings, most tax authorities want to know which specific coins you sold, not just your blended average. That's where FIFO and specific identification come in.

FIFO (First In, First Out)

FIFO assumes the first coins you bought are the first ones you sell. It's the default method the IRS applies to a US crypto sale when you haven't specifically identified which lot you're selling. (IRS) Using the worked example above, selling 0.5 BTC under FIFO would match against Purchase 1, the $40,000-per-coin lot, since it was bought first.

Specific Identification (Including LIFO and HIFO)

Specific identification lets you choose exactly which purchase lot a sale comes from, as long as you can document that choice at or before the time of the sale. LIFO (using your most recent purchase) and HIFO (using your highest-cost purchase) are both selection strategies applied within specific identification, rather than separate, independently accepted methods on their own.

Why the Method You Choose Changes Your Tax Bill

Consider a simpler scenario to see how much this matters. Say you bought 1 BTC in January for $20,000, bought another 1 BTC in November for $50,000, and then sold 1 BTC for $60,000.

How the cost basis method changes the taxable gain on the same $60,000 sale
Method Cost Basis Used for the Sale Taxable Gain
Average cost (blended) $35,000 $25,000
FIFO $20,000 (the January lot) $40,000
Specific ID, highest-cost lot first $50,000 (the November lot) $10,000

The sale price doesn't change. Only the cost basis you're allowed to use against it changes, and that swings the taxable gain from $10,000 to $40,000 depending on the method. This is exactly why the accounting method you use isn't just bookkeeping trivia; it's one of the bigger levers you control at tax time, and it's a big part of why cost basis matters for crypto tax reporting.

What Counts Toward Your Cost Basis

Not every dollar that touches your crypto activity belongs in your cost basis. Here's a practical breakdown.

What typically counts toward crypto cost basis
Item Adds to Cost Basis? Why
Purchase price Yes The core of your cost basis
Exchange fees on a purchase Yes Part of what it cost to acquire the coin
Network or gas fees on a purchase Yes Same idea, paid to complete the buy
Fees when you sell No Reduces sale proceeds instead
Transfers between wallets you own No change The coins keep their original basis
Staking rewards, airdrops, or forked coins Yes, at fair market value received That value is also reported as income

Fees You Pay to Buy

When you buy crypto, add the fee to the purchase price. A $1,000 purchase with a $4 fee has a $1,004 cost basis, not $1,000. It's a small difference on one trade, but it adds up across a full trading history, and it's especially easy to lose track of with Ethereum gas fees that rise and fall throughout the day.

If you're not sure what a fee actually cost you in dollars, our guide on converting gas fees into USD costs walks through it, or plug a transaction straight into 100 Calculator's Ethereum Gas Fee to USD Calculator for an instant dollar figure.

Coins You Receive From Staking, Airdrops, or Forks

If you're not buying a coin outright, cost basis works a little differently. Coins from staking rewards, airdrops, or a hard fork are generally treated as ordinary income at their fair market value the moment you gain control of them. That same dollar value becomes your cost basis for those coins going forward, so when you eventually sell them, you're only taxed on any additional gain above that starting point.

Moving Coins Between Your Own Wallets

Sending crypto from an exchange to your own hardware wallet, or between two wallets you control, isn't a sale. It's not a taxable event, and the coins carry their original cost basis with them. (IRS) The network fee you pay to make that transfer is a separate cost, and it's generally not added to the basis of the coins you're moving.

How Buying, Selling, and DCA Change Your Average Cost

Your average cost basis isn't fixed. It moves every time you buy or sell, and understanding how helps you avoid a common source of confusion.

What Happens When You Sell Part of Your Position

Selling doesn't change your average cost basis for the coins you still hold; it only removes the units you sold, and their share of the total cost, from the calculation. If your average cost basis is $45,030 and you sell a third of your position, your remaining coins still have a $45,030 average cost basis. Only your total holdings and total invested amount shrink together, proportionally.

How Dollar-Cost Averaging Smooths Your Average Price

Buying on a fixed schedule, weekly or monthly, regardless of price, is called dollar-cost averaging, or DCA. It's one of the most common ways people accumulate crypto over time, and it has a direct, visible effect on average cost basis: it smooths it out.

Chart comparing individual purchase prices with running average cost basis across six crypto purchases Line chart illustrating six hypothetical crypto purchases with prices ranging from $60 to $130. A second line shows the running average cost basis recalculated after each purchase, staying within a much narrower band of about $82 to $100. $40 $60 $80 $100 $120 $140 Buy 1 Buy 2 Buy 3 Buy 4 Buy 5 Buy 6 Price paid per purchase Running average cost basis Purchase Number Price per Coin ($)
A hypothetical series of six purchases: individual prices swing from $60 to $130, while the running average cost basis stays in a much narrower $82–$100 band.

In the chart above, individual purchase prices swing from $60 to $130 across six buys, a difference of more than 100%. The running average cost basis, recalculated after each purchase, only moves between about $82 and $100, a far narrower range. That's the practical benefit of buying regularly instead of trying to time one large purchase: your average price absorbs the volatility instead of being fully exposed to whichever single day you happened to buy.

Our guide on how dollar-cost averaging works for crypto investors goes deeper into the mechanics and trade-offs of this strategy, and if you're deciding between DCA and buying in one lump sum, DCA vs lump sum compares both approaches directly.

To plan out a recurring buying schedule of your own, 100 Calculator's Crypto Dollar Cost Averaging (DCA) tool projects how a regular buying plan plays out over time.

Tracking Cost Basis Across Multiple Wallets and Exchanges

Most crypto holders don't keep everything in one place. Some coins sit on an exchange, some in a hardware wallet, and some in a DeFi wallet used for staking. That spread makes tracking harder, and as of 2025, it also changed how the math legally has to work in the United States.

Why This Got More Complicated in 2025

Before 2025, many US investors calculated one blended cost basis across every wallet and exchange they used, sometimes called universal tracking. As of January 1, 2025, the IRS requires cost basis to be tracked separately for each wallet or account. (IRS) In practice, this means coins sold from Exchange A have to use the cost basis of coins bought on Exchange A, not a blend that includes coins sitting untouched on a different platform.

Keeping a running record for each wallet or exchange makes it far easier to stay accurate once tax season arrives.

A Simple Way to Consolidate Your Records

None of this means you can't still calculate an overall average cost basis for your own understanding; it just means tax reporting needs to respect each wallet's own history. A workable approach: keep one record per wallet or exchange with every buy, sell, and fee, then total them up separately when it's time to file, rather than mixing everything into a single pool.

Our guide on why cost basis matters for crypto tax reporting looks at this record-keeping challenge in more depth.

Common Cost Basis Mistakes to Avoid

A few habits quietly throw off cost basis calculations more than people expect. Here's what to watch for, alongside the common crypto profit calculation mistakes that tend to travel with them:

  • Forgetting fees. Skipping trading or network fees understates your cost basis and overstates your gains.
  • Ignoring received coins. Staking rewards and airdrops have a cost basis too, even though you didn't spend cash to get them.
  • Mixing wallets together. Pooling every wallet into one average, instead of tracking each separately, no longer matches how US tax rules work.
  • Losing records from closed exchanges. If a platform shuts down or you stop using it, your transaction history can disappear with it unless you've already exported it.
  • Rounding too early. Cutting off decimal places on unit counts, especially with fractional coin amounts, compounds into a noticeably wrong average over many trades.
  • Assuming your portfolio app already has it right. Many portfolio trackers default to a simple average or miss fees entirely unless you enter every transaction manually.

None of these mistakes are complicated to fix, but they're easy to miss until your numbers stop matching what an exchange or tax form reports.

Average Cost Basis and Crypto Taxes

This is the section worth reading carefully if you're in the United States, because the honest answer here surprises a lot of people.

Is Average Cost Basis Accepted for Crypto Taxes?

In the US, the answer is no. The Internal Revenue Service (IRS) treats cryptocurrency as property, and for property sales it expects you to identify which specific units you sold, not report a single blended average. (IRS) Average cost is a recognized method in some other countries; the UK's "share pooling" rules and similar averaging approaches used in Canada and France work on a comparable principle. If you file taxes outside the US, check your local rules with a tax professional, since this varies by country.

What the IRS Actually Requires

Absent a specific identification, the IRS defaults to FIFO, treating your oldest purchased coins as the first ones sold. If you want to use a different lot on purpose, HIFO or LIFO-style selection, you need documentation identifying the specific units at or before the time of the sale. Since January 1, 2025, all of this has to be tracked per wallet or account rather than pooled together.

Also worth knowing: starting with transactions from 2025 onward, exchanges that qualify as brokers report digital asset sales to the IRS on Form 1099-DA, though basis is only required on that form for coins acquired from 2025 onward. For anything bought earlier, figuring out and documenting your own basis is still on you.

IRS-recognized cost basis methods for US crypto sales, at a glance
Method Requires Specific Documentation? Used by Default?
FIFO No Yes, if you don't identify lots yourself
Specific identification (incl. HIFO/LIFO) Yes, made at or before the sale No, only when you actively choose and document it
Average cost (blended) Not applicable Not accepted for US crypto tax filing

Realized vs Unrealized Gains

One more distinction worth keeping straight: comparing the current price to your average cost basis shows an unrealized gain or loss, a paper number that changes with the market and isn't taxed. You only have a realized gain or loss, the kind that shows up on a tax return, once you actually sell, trade, or spend the crypto.

A qualified tax professional is worth the cost in a few situations especially:

  • You've traded across five or more exchanges or wallets in a single year
  • You've received staking rewards, airdrops, or mining income alongside regular trades
  • You're missing records for purchases made more than a year or two ago
  • You've used margin, futures, or DeFi protocols alongside simple buying and holding
  • You're catching up on multiple years of unfiled crypto transactions at once

None of this is tax advice. Crypto tax rules are genuinely complicated enough that professional help is worth the cost for anything beyond a handful of simple trades.

Related Calculators

Put what you just read into practice, try these free tools instantly, no sign-up required.

Building a Simple Cost Basis Tracking Habit

The best cost basis system is the one you'll actually maintain. A few habits make that realistic.

  1. Log every purchase as it happens. Record the date, amount, price, and fee right after you buy, while the details are still in front of you on the exchange or wallet app.
  2. Keep exchange records even after you stop using a platform. Export a CSV before you close an account or move funds away for good.
  3. Track wallets separately. Keep individual records for each exchange or wallet instead of one combined list, matching how the per-wallet cost basis rules actually work.
  4. Recalculate after every transaction that changes your holdings. A buy, sell, or received reward all shift your average, so update it rather than letting it drift out of date.
  5. Review your numbers before tax season, not during it. A quick monthly or quarterly check catches missing transactions while you can still find the records to fix them.

Once your purchases are logged, 100 Calculator's Crypto Average Cost Basis Calculator turns that list into your average price and current gain or loss in a few seconds, no spreadsheet formulas required.

About the Author

This guide was written by the 100 Calculator Editorial Team. Before publishing anything about crypto accounting or taxes, we research official guidance from sources like the IRS and established crypto tax platforms, so the explanations here match how these rules actually work. We're not accountants or tax attorneys, and nothing in this guide replaces a conversation with one, but we aim to explain the math and the rules clearly enough that you can track your own crypto with confidence and ask sharper questions when you do talk to a professional. We also revisit our guides as tax rules change, since this is an area that shifts more often than most.

Educational content, not tax or financial advice: This article explains general concepts around crypto cost basis and is for educational purposes only. It isn't tax, legal, or financial advice, and rules for digital assets can vary by country and change over time. Talk to a qualified tax professional about your specific situation before filing.

Want to go deeper into crypto accounting and tax topics? These related guides build on what's covered above.

Frequently Asked Questions

What is cost basis in crypto?

Cost basis is the amount you paid to acquire a cryptocurrency, including any fees, used to calculate your gain or loss when you eventually sell, trade, or spend it. If you received the coin instead of buying it, such as through staking or an airdrop, your cost basis is its fair market value at the time you received it. It's the baseline every profit and loss calculation starts from.

How do I calculate average cost basis?

Add up the total amount you've spent buying a coin, including fees, across every purchase. Then divide that total by the number of units you currently hold. The result is your average cost basis per unit, a single weighted price that reflects every purchase you've made, not just your most recent one.

Is average cost basis the same as break-even price?

They're closely related. Average cost basis is the number itself, what you paid per coin on average, and break-even price is how you use it: the price the market needs to reach for you to sell without a gain or loss. In most cases, without extra selling fees, your break-even price and your average cost basis are the same figure.

Does the IRS accept average cost basis for crypto taxes?

No. For US crypto tax reporting, the IRS requires identifying the specific units sold, defaulting to FIFO unless you properly document specific identification. Average cost basis is still useful for tracking your own performance, and it's an accepted tax method in some other countries, but it isn't one of the IRS-approved methods for US digital asset sales.

What's the difference between average cost and FIFO?

Average cost blends every purchase into one price and applies it evenly across your whole position. FIFO instead treats your very first purchase as the first one sold, using that specific lot's price for the sale, regardless of what you paid for everything else. They can produce noticeably different results, especially if your early and recent purchase prices are far apart.

Do transaction and network fees count toward cost basis?

Yes, when they're paid to acquire the coin. Exchange trading fees and network or gas fees you pay while buying crypto are added to your cost basis. Fees paid while selling work differently: they reduce your proceeds from the sale instead of adding to what you paid.

What happens to your average cost basis when you sell part of your crypto?

Selling removes those units, and their share of your total cost, from the calculation, but it doesn't change the average price of the coins you still hold. If your average cost basis was $45,000 per coin before the sale, it's still $45,000 per coin for whatever remains afterward.

How does dollar-cost averaging affect your average cost basis?

Dollar-cost averaging, buying a fixed amount on a regular schedule, tends to smooth your average cost basis over time. Because you're buying through both price dips and rallies, your average lands somewhere in the middle of that range rather than being fully exposed to whatever the price happened to be on a single purchase day.

Do staking rewards and airdrops affect your cost basis?

Yes. Coins received from staking, airdrops, or a hard fork are generally treated as ordinary income at their fair market value when you gain control of them, and that same value becomes their cost basis. You're taxed on that value as income first, then only on any further gain when you eventually sell those coins.

Does moving crypto between your own wallets change its cost basis?

No. Transferring coins from an exchange to your own wallet, or between two wallets you control, isn't a sale and doesn't reset the cost basis. The coins keep the basis they had before the transfer; only the network fee for making the transfer is a separate cost.

Do I need to track cost basis separately for each wallet or exchange?

For US tax purposes, yes, as of January 1, 2025. The IRS now requires cost basis to be tracked on a per-wallet or per-account basis rather than pooled together across every platform you use. You can still calculate one overall average for your own reference, but tax reporting has to respect each wallet's own purchase history.

What's the easiest way to track average cost basis without a spreadsheet?

An online calculator is the fastest option. 100 Calculator's Crypto Average Cost Basis Calculator lets you enter each purchase, including fees, and returns your average cost basis and current gain or loss immediately, without building any spreadsheet formulas yourself or manually adding up totals by hand.

What happens if I can't prove my cost basis?

If you can't document what you paid, the IRS can treat your cost basis as zero for that sale, meaning the full sale amount counts as a taxable gain instead of just your actual profit. Keeping purchase records, even simple exported CSV files from an exchange, protects you from this outcome.

Is average cost basis useful even if I haven't sold anything yet?

Yes. It gives you an honest read on unrealized profit or loss any time you check your portfolio, without waiting until you sell to find out where you stand. It's also the same purchase data you'll eventually need for tax reporting, so tracking it early saves work later.

Can I switch cost basis methods later?

For US tax filing, generally yes, from one tax year to the next, but you typically need to apply a method consistently within a given year and have documentation to support it. Switching methods retroactively for a sale that already happened isn't allowed, since specific identification has to be made at or before the time of sale.

What's the difference between realized and unrealized gains?

An unrealized gain or loss is a paper figure, based on comparing the current price to your cost basis while you still hold the coin, and it isn't taxed. A realized gain or loss happens once you actually sell, trade, or spend the crypto, and that's the number that shows up on a tax return.

About 100 Calculator

100 Calculator is a free hub of online calculators and educational guides covering health, finance, trading, crypto, education, and more. Every tool is built to be fast, accurate, and genuinely free, with no account or signup required.

We built this guide, and tools like the Crypto Average Cost Basis Calculator referenced throughout it, to make everyday crypto math a little easier to get right. Head back to the 100 Calculator homepage to explore the full library of tools, or learn more about the team behind them on our About Us page.