How to Calculate Your Crypto Taxes

We outline how to calculate your crypto capital gains tax, including tracking transactions, choosing an accounting method, and finding your cost basis.

Table of Contents

This article is part of our tax guide. Get help with cryptocurrency tax filing.

A large part of calculating your cryptocurrency taxes is calculating your capital gains and loss totals, or the difference in value between the acquisition price of an asset and the sale price. This is the same way that taxable profits would be calculated on stock trades or the sale of property.

Tracking your tax lots

To compute your tax liability, you need to track your tax lots. A tax lot is simply the record of tokens purchased or otherwise acquired in a single transaction.

A tax lot includes the following information from your transaction history:

  • Amount and currency of the coin or token sold
  • Fiat value at time of acquisition
  • Date of acquisition
  • Fiat value at time of trade or sale
  • Date of sale

It is very important to keep detailed records of your trades, because it is often very difficult to retroactively find and fill in missing data—and any missing cost basis increases your tax liability.

If you do find you have missing data, it can often be found in receipts and exchange transaction confirmation emails, but this can be a gargantuan task. Crypto tax software automatically tracks your tax lots, allowing you to largely avoid the hassle of missing trade data.

Even if you are using a crypto tax calculator, it's a good idea to keep notes on special situations, such as lost coins and ICOs.

If you’re having trouble reconciling your transaction data, TokenTax’s crypto tax specialists can also take over the job for you.

Calculating your crypto capital gains and losses

At its core, calculating crypto capital gains and losses is simple: proceeds - cost basis = capital gain or loss. Both gains and losses should be reported, because capital losses can offset capital gains. However, a few variables may affect how you determine your cost basis, and thus affect your totals.

Crypto tax accounting methods

The IRS allows taxpayers to choose which accounting method they will use each year. Among the most popular allowed options are FIFO, LIFO, and HIFO. These methods match up acquisitions and dispositions of tax lots of the same asset differently:

  • First in, first out (FIFO): Assets acquired first are sold first
  • Last in, first out (LIFO): Assets acquired last are sold first
  • Highest in, first out (HIFO): Highest price assets are sold first

As such, these methods can produce different cost bases, and thus produce different capital gains and losses.

For example, imagine you sold 1 BTC in 2021 for $35,000 but had purchased 1 BTC in 2018 for $8,000, 1 BTC in 2019 for $4,000, and 1 BTC in 2020 for $25,000. Whichever tax lot you choose as the cost basis for your 2021 sale will have a large impact on your taxable capital gains amount ($27,000 of gains, $31,000 of gains, or $10,000 of gains respectively).

For more on this topic, read our blog post on crypto accounting methods.

Transaction fees

Many crypto transactions involve fees: to exchanges, to protocols, and/or Ethereum gas fees. In many cases, these fees can be added to your asset’s cost basis to decrease your capital gains or increase your capital losses.

For example, let’s say that to swap 3,000 USDC for 1 ETH on Uniswap, you had to pay $100 in fees. You can add that $100 to the ETH’s cost basis, making it $3,100.

Note that whether transaction/gas fees can be added to cost basis depends on the type of transaction. Check out this blog post for more information on how fees can affect your crypto tax calculation.

Determining your capital gains tax rate

Crypto transactions are taxed at different rates depending on if the asset was held for less than a year (short term), or a year or more (long term). Thus, they are reported separately to the IRS, so you should split them up when calculating your taxes.

Long-term gains are treated preferentially by the IRS, with rates of 0%, 15%, or 20% depending on your tax bracket. Short-term gains are taxed at the same rate as your income.

Crypto tax calculation example

Once you’ve assembled your full transaction history, you can start calculating your capital gains and losses. To illustrate the specific details of the calculation, let’s walk through some concrete examples of how to match up crypto trades.

If you bought bitcoin, traded short term for litecoin, and then sold that litecoin long term for fiat, your trades in chronological order would be as represented below. Your capital gains tax calculation will be split out between short-term and long-term trades held for a duration of less than a year or greater than a year, respectively.

  • You bought 1 BTC for $30,000 (including fees), thus your cost basis for this lot of 1 BTC is $30,000.
  • You sold this 1 BTC for $32,000 (including fees) worth of LTC the next day, thus the proceeds are $32,000.
  • Subtract the cost basis of $30,000 from the proceeds of $32,000, and your gain is $2,000. This amount is subject to short-term capital gains tax and reported on that year's tax returns.
  • More than a year later, you sold the $32,000 of LTC for $35,000 (including fees) in dollars.
  • Subtract the cost basis of $32,000 from the proceeds of $35,000, and your gain is $3,000. This amount is subject to long-term capital gains tax and reported on the tax returns of the year in which it was sold.

Now imagine that instead of $32,000 of LTC being sold at a gain, it was sold at a loss. That tax year, you engaged in other trading that resulted in cumulative long-term gains of $50,000.

  • You sell the $32,000 of LTC for $25,000 (including fees). The proceeds are thus $25,000.
  • Subtract the cost basis of $32,000 from the proceeds of $25,000 for a net loss of $7,000.
  • Subtract your long-term capital loss of $7,000 from your long-term capital gains of $50,000. Your new taxable long-term gains amount is $43,000.

For more on reporting losses, read our guide.

Only realized gains and losses are included in crypto tax calculations

Gains on crypto (and property in general) are not “realized” until you sell, exchange, or spend the asset. This means that if you only bought AVAX once and held it, never selling or exchanging it, then you don’t have any realized (taxable) gains or losses — only unrealized gains or losses.

Our tax loss harvesting dashboard can help you keep tabs on what your unrealized gains and losses are, so that you can strategically harvest your losses to potentially lower your tax liability.

Is like-kind exchange allowed for crypto?

A like-kind exchange is when you exchange one asset for another similar asset without recognizing capital gains or losses on the transaction.

Like-kind is specifically disallowed for crypto. It can only be used for real estate.

Crypto income tax

If you receive crypto as payment for goods or services, as interest or staking rewards, from mining, or from a hard fork or airdrop, it is taxed as regular income. The income tax rate is dependent on your income bracket.

How to use a crypto tax calculator to find your crypto tax liability

Crypto tax calculators work by aggregating your data and then automatically linking your cost bases to your sales, using accounting methods like FIFO or LIFO. They calculate your gains or losses and automatically populate tax reports with your data.

These are the basic steps of using a crypto tax calculator:

  1. Import all your cryptocurrency exchange trade history, as well as any transactions made off-exchange.
  2. Verify that all historical data has been imported, and that your crypto taxes are calculated properly. If not, manually edit the data to correct it.
  3. Decide on an accounting method.
  4. Export your tax forms.
  5. Include your crypto taxes on your return.

For more on using TokenTax as your crypto tax calculator, visit our Help Center’s getting started guide.

Learn how to save money on your crypto taxes

We’ll send you tips that smart investors use when filing their taxes

Calculate your crypto taxes now

TokenTax does the hard work so you don’t have to.