Michelle Legge
By Michelle LeggeHead of Crypto Tax Education
Updated Oct 24, 2024
Robin Singh
Reviewed by Robin Singh
Founder
This article has been fact checked and reviewed as per our editorial policy.

What is Cost Basis in Crypto?

Looking for a crypto cost basis calculator? Want to know the cost basis of your crypto? Learn about cost basis methods like FIFO, LIFO, and ACB and optimize your crypto taxes in 2024!

Calculating your crypto taxes? You need to be able to accurately figure out your cost basis to know your capital gains and losses. But when you're dealing with lots of cryptocurrencies of the same kind, you'll need to use what's known as a cost basis accounting method - and using certain cost basis methods can even optimize your crypto tax position. Learn everything you need to know about cost basis, Bitcoin cost basis accounting methods, and compare FIFO vs. HIFO vs. LIFO and more to figure out what the best accounting method is for your taxes.

What is cost basis in crypto?

Put simply, your cost basis is the original price you paid for an asset - in this instance, crypto.

In accounting, we need to know the cost basis of an asset, like a share or a cryptocurrency, in order to calculate our profit on the day we sell, swap, or spend (or sometimes gift) that asset.

In the case of crypto tax, the cost basis is the original price plus any related fees, of the crypto on the day you took ownership of it - whether you bought it, were gifted it, or (sometimes) had it airdropped to you. When calculating the cost of an asset you purchased, you can also add any transaction fees you paid when you bought/sold it.

An infographic with a calculator and sum explaining how to calculate crypto cost basis, presented by Koinly, a crypto tax calculator

For example, let’s say you bought 0.5 BTC for $30,000 and you paid a 0.5% buy fee, so $150. Your cost basis would be $30,150.

You later sell your 0.5 BTC for $32,000. You pay another 0.5% sell fee, so $160. Your cost basis is now $30,310. You can calculate whether you made a capital gain or loss by subtracting your cost basis from your sale price. In this instance, $32,000 - $30,310 = $1,690. You made a capital gain of $1,690 and you’ll need to pay Capital Gains Tax on this amount.

An infographic highlighting information on how to calculate a crypto gain, presented by Koinly, a crypto tax software

Why are there different cost basis methods for crypto?

Now we’ve covered the basics, you’re probably wondering why there are different cost basis methods when it’s all pretty straightforward in our example above. We’ll use a different example to explain where were looking at Bitcoin cost basis.

You bought 1 BTC for $7,000 in December. In January, you bought 1 BTC for $35,000. This month, you sold 1 BTC for $31,000.

If you calculate your cost basis using your first investment, you made a capital gain of $28,000, which would be subject to Capital Gains Tax. But if you calculate your cost basis using your more recent BTC investment, you had a capital loss of $4,000.

There's a huge disparity between the two calculations and it has big implications for your tax bill. So, how do you know which Bitcoin cost basis method to use?

There are several different cost basis methods to pick from, including:

  • First In, First Out (FIFO)

  • Last In, First Out (LIFO)

  • Average Cost Basis (ACB)

  • Highest Cost, First Out (HIFO)

  • Lowest Cost, First Out (LCFO)

  • Specific Lot Identification (Spec ID)

  • Loss Gain Utilization (LGUT)

Different cost basis methods

As well as these cost basis methods, there are also some country-specific cost basis rules like the same-day rule and 30-day rule for UK crypto investors.

Your tax office will give specific guidance on the cost basis methods available to you. Some countries, like Australia, allow you to pick from several cost basis methods, while others, like the UK, have stringent rules about which cost basis method to use and when.

We’ll look at each cost method separately, followed by specific country guidance on which to use.

FIFO cost basis crypto accounting method

First In, First Out (FIFO) is one of the most common cost basis methods and it's very straightforward. FIFO means the first asset you buy is the first asset you sell.

From a tax perspective, FIFO can be beneficial as it allows investors to take advantage of long-term Capital Gains Tax discounts which are often much lower than short-term Capital Gains Tax rates.

However, as long-held assets have often appreciated in value the most, FIFO can often leave investors with the highest gains and therefore the largest Capital Gains Tax bill.

FIFO cost basis method

HIFO cost basis crypto accounting method

The Highest In First Out (HIFO) cost basis method means it doesn’t matter when you purchased an asset, it's all about how much it cost you to buy the asset. The highest price you paid for a given asset is the cost basis you use when you sell it.

The benefits of HIFO for investors are clear - the larger the cost basis, the lower the capital gain. The HIFO cost basis method will generally result in the lowest Capital Gains Tax bill.

However, not all countries allow investors to use the HIFO cost basis method when calculating their capital gains.

HIFO cost basis method

LIFO cost basis crypto accounting method

The Last In, First Out (LIFO) cost basis method is the opposite of FIFO. Instead of using the cost basis method of the asset you purchased first, you use the cost basis of the asset you purchased most recently.

The pros and cons of the LIFO cost basis method are essentially the opposite of FIFO. You may be subject to higher short-term Capital Gains Tax rates. However, investors may pay less tax overall as their most recently purchased assets may not have appreciated in value as much. As the crypto market is so volatile, in some instances using the LIFO method will result in more capital losses, which are not subject to tax.

LIFO cost basis method

ACB cost basis crypto accounting method

Average cost basis (ACB) is another simple cost basis method and often the preference when dealing with other financial assets like shares.

To calculate the cost basis using ACB, you need to figure out an average cost for all assets. You calculate this by adding up the total amount you paid to buy your asset(s) and dividing it by the total amount of coins/tokens held.

For example, if you held 5 BTC all bought for different amounts, you’d add up these different amounts and then divide this by 5. You’ll need to do this for all the different cryptocurrencies in your portfolio.

Countries that use the average cost basis method include Canada, the UK, and France. However, many of them call it something slightly different as they have a couple of additional rules as part of the method. For example, the UK uses the Share Pooling method, which is an average cost basis method with wash sale rules built in, France uses the Weighted Average Acquisition Price (PMPA) and Japan uses either the Moving Average or Total Average Method. Though they're all similar to the average cost basis method, they all have slight differences.

LCFO cost basis crypto accounting method

Like FIFO and LIFO, the Lowest Cost First Out (LCFO) cost basis method is the opposite of the HIFO cost basis method. You'll use the lowest cost basis available for a given asset when calculating your capital gains and losses.

The pros and cons of LCFO are similar to LIFO. You may benefit from discounted long-term Capital Gains Tax rates, but you'll also likely end up with a higher net capital gain than with other methods.

Spec ID cost basis crypto accounting method

The Specific Identification (Spec ID) cost basis method lets you use the actual cost basis for the asset you sold. This is much easier to track with digital assets thanks to TXN numbers than it is with other financial assets like shares.

The big con of this is that if you're not using cryptocurrency tax software and you trade at volume, then calculating your cost basis for every disposal manually can be a time-consuming affair. It is, however, the most accurate way to report your real capital gains and losses compared to other methods and will hold up best under scrutiny by tax authorities.

There are other countries that use Spec ID - like Austria - although they don't necessarily call it Spec ID.

Specific Identification

LGUT cost basis crypto accounting method

The Loss Gain Utilization (LGUT) cost basis method means you use the cost basis that would result in the largest loss first. You can't use the same cost basis over and over again, so you’ll work through your available cost basis options from the largest loss to the smallest. Short-term losses are prioritized over long-term losses.

By using the LGUT cost basis method, you'll end up with the lowest Capital Gains Tax bill possible that year, so the benefits are obvious. However, many tax offices don't allow the LGUT cost basis method, and even many of the tax offices that do allow it haven't yet clarified whether LGUT cost basis may be used when calculating crypto capital gains taxes. So if you want to use the LGUT method, you should speak with an accountant for advice beforehand.

Loss Gain Utilization

FIFO vs HIFO vs LIFO: Which cost basis method saves taxes?

As you can see, with so many different cost basis methods available, there are a lot of ways to calculate your capital gains and losses - all of which will affect your Capital Gains Tax bill. In countries where you can choose the cost basis method you use, the best cost basis method to use is the one that allows you to optimize your tax position.

Let’s say you made the following purchases over a period of time in this chronological order:

  • April 2019 Buy: 1 BTC for $7,000.

  • December 2020 Buy: 2 BTC for $15,000.

  • June 2021 Buy: 1 BTC for $35,000.

This tax year, you sold 1 BTC for $30,000. You made a disposal and you need to calculate your gain or loss. You know the asset you sold was bought in December 2020 from the TXN number.

Use the Bitcoin tax spreadsheet below to see how each cost basis method changes how you calculate Bitcoin tax and your resulting gains and losses.

FIFOLIFOACBHIFOLCFOSpec IDLGUT
Cost Basis$7,000$35,000$14,250$35,000$7,000$7,500$35,000
Capital Gain/LossGain of $23,000Loss of $5,000Gain of $15,750Loss of $5,000Gain of $23,000 Gain of $22,500Loss of $5,000

In a best-case scenario from a tax perspective, you’d be registering a loss of $5,000 with your tax authority, which you can offset against any other gains. In a worst-case scenario, you’d be paying Capital Gains Tax on a gain of $23,000.

Some countries - like America - let you pick the cost basis method you use. This lets you pick the cost basis method that optimizes your tax position. It’s important to understand that once you’ve used a specific cost basis method to calculate and report your capital gains and losses, you can’t change it retrospectively.

In some countries, you’ll need to stick with one cost basis method for good. In others, you’ll be able to change the cost basis method you use each financial year to suit you - provided it doesn’t affect your previous calculations.

In general, the best rule of thumb to avoid an unwelcome audit is to pick one cost basis method and stick with it every financial year for consistency.

All this said, some countries give specific guidance on which cost basis methods you can use. We’ll look at how some tax offices around the world calculate crypto taxes.

USA crypto cost basis method

Previously, the IRS said where possible, crypto investors should specifically identify the assets they've disposed of, which means, provided you can specifically identify the assets you're disposing of, you can utilize cost basis methods like HIFO, LIFO, and FIFO under the scope of Spec ID.

This is due to change though. From January 1st, 2025, the IRS will require investors to use wallet-based cost tracking as part of new crypto legislation. This effectively means investors can still dispose of assets in any order they wish (i.e. FIFO, LIFO, HIFO), but their transaction records must actually match these disposals.

You can find more information in our US Crypto Tax Guide.

UK crypto cost basis method

The UK’s HMRC has very specific rules for crypto cost basis methods, known as share pooling. This is to stop crypto investors from manipulating the ACB method by purchasing and selling assets at a loss in a short period of time to create an unrealistic view of gains and losses.

In the UK, there are three possible cost basis methods you can use and you need to work through them in order of which applies to your assets:

  1. Same-Day Rule: If you buy and sell coins on the same day, you need to use the cost basis on this day to calculate your gains/losses. If you’re selling more than you bought on that day, move on to the next rule.

  2. Bed and Breakfasting Rule: If you buy coins/tokens and sell the same coins/tokens within 30 days, you’ll use the cost basis of coins/tokens you bought within this month to calculate your gains/losses. If you’re selling more than you bought within this month, move on to the final rule.

  3. Section 104 Rule: If the above two rules don’t apply to any of your crypto transactions, you need to use this cost basis method when calculating your crypto taxes. This works like the ACB method in that you calculate an average cost basis for a pool of assets by adding up the total amount paid for all assets and dividing it by the total amount of coins/tokens held.

You can find more information in our UK Crypto Tax Guide.

UK Cost Basis Share Pooling

Australia crypto cost basis method

For Australian investors, the ATO lets you use a variety of cost basis methods when calculating your crypto capital gains, though FIFO tends to be the most common.

For Australian traders, your cost basis method is limited to FIFO or ACB.

You can find more information in our Australian Crypto Tax Guide.

Canada crypto cost basis method

The Canadian Revenue Agency says taxpayers must use the adjusted cost basis method when calculating crypto capital gains and losses. The adjusted cost basis method is the cost of an asset plus any fees related to it.

You can either use the fair market value (FMV) of the asset at the point you acquired it or the FMV of the asset at the end of the year - whichever is lower.  For this reason, you need to keep very accurate records of your crypto transactions in Canada.

For investors with multiple assets, you can choose to value your entire inventory for its FMV at the end of the year instead.

When it comes to multiple assets, the CRA is clear that investors should use the average cost basis method with the superficial loss rule.

You can find more information in our Canada Crypto Tax Guide.

Adjusted Cost Basis

France crypto cost basis method

In France, the DGFIP states crypto investors should use the PVCT method (plus values de cessions d'actifs numériques) for calculating crypto gains and losses. This method involves determining your cost basis by dividing the acquisition cost of your crypto portfolio by the total portfolio value and then subtracting this from the sale price.

The plus values de cessions d'actifs numériques formula is:

Sale price – (total acquisition costs x [sale price/total portfolio value])

  • Sale price: amount received when you sold a crypto asset.

  • Total acquisition costs: the price (in EUR) to purchase your crypto plus any allowable fees.

  • Total portfolio value: the price (in EUR) paid for your entire crypto holdings.

It sounds a little complicated, but fortunately, Koinly can simplify it for you as it supports the PVCT (PFU) accounting method. You can find more information in our France Crypto Tax Guide.

Use a crypto cost basis calculator

Tracking your cost basis across multiple exchanges and wallets can get time-consuming, especially if you're an active investor, which is why most investors opt to use a crypto cost basis calculator like Koinly.

Koinly identifies and tracks your cost basis across all your wallets and exchanges, and calculates any gains or losses based on your preferred cost basis method in your country. For example, share pooling is the default cost basis method for UK Koinly users. Or for investors with a variety of cost basis methods to pick from, you can head into your settings in Koinly and pick the cost basis method you want to use and let Koinly do the rest.

Cost Basis Methods in Koinly

Koinly supports the following cost basis methods:

  • FIFO

  • LIFO

  • HIFO

  • ACB

  • Share Pooling (for UK users only)

  • Adjusted Cost Basis with Superficial Loss Rule (for Canadian users only)

  • PFU (French users only)

Once you've picked your cost basis method in your settings, you need to sync your wallets via API automatically or by uploading a CSV file of your transactions. Koinly will identify your cost basis, either by your transaction data, or based on the fair market value of the crypto in your fiat currency on the day you acquired it, like so:

Koinly tracks BTC transactions to calculate taxable income from Bitcoin profits

TLDR;

  • Your cost basis is the original price you paid for a coin/token, plus any transaction fees.

  • You subtract your cost basis from the price you sold an asset for to calculate your capital gains or losses.

  • You need to calculate your capital gains anytime you sell, swap, or spend crypto (as well as gift in some countries).

  • Different countries use different cost basis methods.

  • The cost basis method you use can help you optimize your tax position.

  • The most common cost basis methods are First In, First Out, and Average Cost Basis.

  • Koinly is a trusted crypto cost basis calculator

General CTA

Disclaimer
The information on this website is for general information only. It should not be taken as constituting professional advice from Koinly. Koinly is not a financial adviser. You should consider seeking independent legal, financial, taxation or other advice to check how the website information relates to your unique circumstances. Koinly is not liable for any loss caused, whether due to negligence or otherwise arising from the use of, or reliance on, the information provided directly or indirectly, by use of this website.