Coming soon: The only portfolio tracker you’ll ever need. Find out more

How To Calculate Crypto Taxes

Cryptocurrency Taxation: How To Calculate Crypto Taxes?

Want to learn how to calculate crypto taxes, here’s a complete guide on this topic. You can also use ZenLedger, an all-in-one crypto taxes calculator.

The IRS is taking an increasingly aggressive stance on cryptocurrencies, where it feels many taxpayers are neglecting to pay what they owe. In addition to a new question at the top of Form 1040, the agency has hired blockchain experts to assist in audits and has sent out numerous rounds of warning letters to taxpayers.

Let’s take a look at the IRS’s stance on cryptocurrencies, how crypto taxes work on basic transactions, how to calculate crypto taxes, and expert opinions on the tax treatment of more exotic transactions.

How Does Crypto Tax Calculation Work?

The IRS issued its first cryptocurrency guidance back in 2014 with Notice 2014-21, explaining that virtual currency was treated as property for federal income tax purposes. Since then, the agency has addressed some questions that have arisen in various FAQs, such as the tax treatment of airdrops and hard forks following the initial coin offering (ICO) craze.

On the most basic level, you owe capital gains tax on any increase in value and have the ability to write off any decrease in value. If you buy Bitcoin at $10,000 and sell at $20,000, then you owe capital gains tax on the $10,000 gain. The exact tax rate depends on the holding time (more or less than a year) and your income tax bracket.

The challenge that comes across when wondering how to calculate crypto taxes is aggregating transactions across exchanges and wallets and computing the cost basis for crypto-to-crypto transactions. For example, if you sold Bitcoin for Ethereum several months ago, you must determine the U.S. dollar value of both at the time of the transaction in order to compute the capital gains and losses in U.S. dollars.

how to calculate crypto taxes
ZenLedger interfaces with many popular crypto exchanges. Source: ZenLedger

ZenLedger and other crypto tax software solutions simplify the process by integrating with exchanges and wallets to pull in transactions and automatically compute cost basis. In addition, ZenLedger can handle complex transactions (explored in greater detail below), identifies tax-loss harvesting opportunities, and integrates with TurboTax and other solutions.

How To Calculate Cryptocurrency Taxes

In order to accurately calculate your crypto taxes, you will need to make sure you track your tax lots which essentially entails the cost basis (the amount you originally paid for the crypto), the time held, and the price at which you traded away or sold the crypto.  Besides, for each sale or exchange, you will need to additionally rack the following information-

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

How To Calculate Crypto Taxes Example

If you have the aforementioned transaction history in place, it will be easier for you to file crypto taxes error-free and foolproof. In order to explain the next steps, let’s take an example. Assume that you purchased a Bitcoin, traded short-term for Ethereum, and then sold that Ethereum coin for a long-term for fiat. Now, your capital gains tax reporting will be split divided between short-term and long-term capital gains, depending on how long the coins were held (less than a year or more than a year respectively).  

  • Let’s say bought 1 BTC for $10,000 (including fees). This makes the cost basis for this lot of 1 BTC  $10,000.
  • You sold this 1 BTC for $20,000 (including fees) worth of ETH two days later, resulting in proceeds of $20,000.
  • Now, subtract the cost basis of $10,000 from the proceeds of $20,000. This $10,000 will be your capital gain amount liable for a short-term capital gains tax.
  • Now assume that two years later, $20,000 ETH for $25,000 (including fees) in dollars, resulting in proceeds worth $25,000.
  • subtract the cost basis of $20,000 from the proceeds of $25,000. This $50,000 will be your capital gain amount liable for a long-term capital gains tax.

Is All Cryptocurrency Taxed?

Cryptocurrency taxes may seem fairly straightforward on the surface—albeit, somewhat nuanced—but there are plenty of complex edge cases. In many of these instances, the IRS hasn’t provided any specific guidance on the topic (yet), but there is some consensus among tax experts on the best course of action that keeps within the spirit of past IRS guidance.

Some of the most common edge cases include:

Decentralized Finance

DeFi grew so quickly that the IRS hasn’t issued any specific guidance. That said, most tax experts recommend paying capital gains tax on the tokens received from yield farming since it’s a new property. A more aggressive taxpayer might argue that it’s not a taxable event because yield farming simply involves staking money as collateral and does not involve the sale of property.

The Complete DeFi & Yield Farming Crypto Tax Guide

ETH Gas Fees

ETH gas fees are required payments for a variety of actions on the Ethereum blockchain, including such as trading or yield farming. While the IRS hasn’t provided specific guidance, most tax experts agree that gas fees can be added to the cost basis of an asset, which reduces capital gains or increases capital losses when the asset is sold.

Margin Trading

Margin trading involves borrowing capital to increase leverage on a trade or investment. The margin interest on borrowed capital is deductible up to your net investment income amount and reportable on IRS Form 4952, which flows down to Schedule A Line 9 or Schedule C, depending on your tax entity status.

Crypto Mining

Crypto mining is typically considered a business activity. The crypto generated from mining activity is taxed as regular income. Upon sale, the business must also pay capital gains taxes on any increase in value from the mined price. Any expenses associated with mining—such as hardware and electricity—are tax deductible.

Crypto Mining & Taxes: What You Need to Know

Ethereum Staking

Ethereum Staking has replaced proof of work as a consensus mechanism on the blockchain in version 2.0. While the IRS hasn’t issued specific guidance on staking, the consensus is that any income from staking is taxable as ordinary income since it’s analogous to receiving interest on property.

Hard Forks

Hard forks occur when a cryptocurrency undergoes a protocol change that results in a permanent division from a legacy ledger and the issuance of new cryptocurrency. When a taxpayer receives a new cryptocurrency and still owns the legacy cryptocurrency, then the new cryptocurrency is considered an airdrop and subject to ordinary income rules. If the taxpayer no longer owns the original (e.g., with Ethereum 2.0) it’s not taxable.

What Are Hard Forks & How Do They Impact Taxes?


Airdrops are free cryptocurrency tokens sent to a wallet by ICO issuers or existing blockchain networks. In these cases, the new coins are taxed as ordinary income rather than capital gains, regardless of whether the taxpayer sells the token.

Roth IRAs

Roth IRAs are a common way to avoid taxes when investing in cryptocurrencies. In exchange for giving up withdrawal rights until retirement, investors can pay taxes on the amount invested into the account now and avoid paying any taxes in the future.

ZenLedger and some other crypto tax solutions can handle many of these complex transaction types while adhering to tax expert consensus. By using crypto tax software, you can minimize the chances of a costly audit by accurately reporting what’s owed, avoid the all-too-common overpayment of crypto taxes, and have a paper trail in place to defend yourself in an audit.

Crypto Taxes On Capital Gains and Losses

You must naturally be wondering about the crypto taxation policy on capital gains and capital losses. To put it simply, gains on crypto are counted towards taxes only when ‘realized.’ This means that your gains will not be counted as ‘realized’ unless you sell, exchange, or spend the asset. If you only bought BTC once and held it, never selling or exchanging it, then you will only have ‘unrealized’ gains or losses and so, your crypto won’t be taxable!

The Bottom Line

So here was our take on how to calculate crypto taxes! As it must now be clear, cryptocurrency taxes are relatively straightforward on the surface, since the digital currencies are simply defined as property by the IRS. Of course, the rise of DeFi, NFTs and other crypto assets have introduced a number of questions that the IRS has yet to answer. In the meantime, many tax experts recommend taking a conservative approach.

The easiest way to avoid these problems is using crypto tax software, such as ZenLedger, to ensure that your taxes are accurate and defensible. Get started for free today!

In addition to tax software, taxpayers should consider engaging a CPA or other tax professional that can evaluate how crypto plays into the rest of their assets, avoid overpaying taxes and ensure that everything is accurately reported to the IRS.

How To Calculate Crypto Taxes FAQs

1. How to calculate Bitcoin tax?

Using a crypto tax calculator like the one available on Zen Ledger’s website is perhaps the easiest way to calculate your Bitcoin taxes. ZenLedger uses your cryptocurrency transaction history to easily generate a Schedule 1 – which is used to report income from sources other than wages, interest, and dividends. You can also additionally integrate your transaction data with TurboTax desktop or online!

2. How to use a crypto tax calculator to calculate your crypto taxes?

Most crypto tax calculators work on accounting methods like FIFO or LIFO to automate the gains or losses calculation process and to then populate tax reports with your data. Typically, here’s how to use a bitcoin tax calculator:
  • Import all your cryptocurrency exchange trade history (including transactions made off-exchange)
  • Verify that all historical data has been imported
  • Verify that the crypto taxes are calculated in the right manner
  • Choose your preferred accounting method
  • Export your tax forms
  • Include your crypto taxes on your return!

  • 3. How can I avoid paying taxes on Crypto?

    The easiest way to defer or eliminate tax on cryptocurrency is to buy your crypto inside a traditional IRA. This will help you defer taxes on the gains until you begin to take distributions!