visit
Cryptocurrency taxes (known formally as capital gains taxes) have to be paid on the profit/loss that you make from crypto trading. In this article we will look at how they are calculated. If you want to learn more about how crypto taxation works in general i.e. the laws and regulations, you may want to check out this .
A capital gain (profit/loss) occurs when you sell or trade cryptocurrencies and is calculated by subtracting the price you bought the crypto for (cost-basis) from the price you are selling it for. Capital Gain = Selling Price - Cost basis. This seemingly simple formula becomes complicated when you add more transactions as we will see. The amount of tax you pay is a percentage of your total capital gains.Note: Cost-basis is an accounting term that refers to: purchase price + fees + any other acquisition costs.
The best and easiest way of explaining the process of calculating your capital gains is through an example. So, in this article we are going to assume that, a fictional character, John has made the following crypto transactions and wants to calculate his capital gains and taxes.This is known as Average Cost Basis (ACB).
There are also other ways of calculating the cost-basis known as First In First Out (FIFO), Last In First Out (LIFO) and a special variant known as Specific Identification (Spec ID).
In the US, the IRS allows only FIFO, LIFO and potentially Spec ID to determine the cost-basis. ACB is not allowed in the US but is still widely used in countries like Canada & Sweden.Let's look at how the cost-basis is calculated using each of these methods.Transaction #3: Sell 0.5 BTC. John has 0.75 BTC and bought it for a total of 600 USD. The average cost for 1 BTC is: 600 / 0.75 = 800 USD. So, the cost-basis for 0.5 BTC is: 800 x 0.5 = 400 USD.
Transaction #4: Sell 0.25 BTC. At this point John only has 0.25 BTC left and bought it for: 600 (total cost) - 400 (already sold) = 200 USD. However, this sale also had a $10 fee so the actual cost-basis is $210.
Now that we have the cost-basis for all transactions, the capital gains can be easily calculated:Capital gains for txn #3:
200 (selling price) - 400 (cost-basis) = -200 USD
Capital gains for txn #4:
400 - 210 = +190 USD
The final capital gains using ACB are -10 USD which means John made a loss of $10.Transaction #3: Sell 0.5 BTC. The cost basis can be calculated by taking the full cost of the 0.25 BTC txn (ID #1) and half of the cost of the second 0.50 BTC transaction (ID #2):
100 + (500/2) = 350 USD
Transaction #4: Sell 0.25 BTC. Here the cost-basis calculation is picked up from the previous sell transaction. Since only half of the 0.50 BTC in txn ID #2 was sold, the remaining half will go towards the cost-basis for this one. Note that this transaction also has a 10 USD selling fee, so the cost-basis becomes:
(500/2) + 10 = 260 USD
Let's calculate the capital gains:Capital gains for txn #3:
200 - 350 = -150 USD
Capital gains for txn #4:
400 - 260 = +140 USD
Here the final taxable gains are
140 - 150 = -10 USD
. Again, a loss of 10 USD.Transaction #3: Sell 0.5 BTC. Cost-basis for this transaction is relatively straightforward, since the most recent purchase was for 0.5 BTC (txn #2) at a cost of 500 USD - this becomes the cost-basis.
Transaction #4: Sell 0.25 BTC. As txn #2 was fully used as the cost-basis for txn #3, you now move to the crypto that was bought before it, which is the 0.25 BTC bought for 100 USD. The amount of crypto being sold and bought is the same so the cost-basis is simply 100 USD. However, you must add the selling fee of $10 so the final cost-basis becomes
100 + 10 = 110 USD.
The capital gains are calculated in the same way as FIFO/ACB:Capital gains for txn #3:
200 - 500 = -300 USD
Capital gains for txn #4:
400 - 110 = +290 USD
The final capital gains are thus
-10 USD
.Lets look at a different example that can better demonstrate SpecID:
Alice bought 1 BTC for 1000 USD in January and another 1 BTC in Feb for 5000 USD. She sold 1 BTC in May for 4000 USD. Here are her transactions:With cryptocurrency tax reporting, the most crucial thing is to keep track of ALL your transactions and trades. If you are a daredevil you may attempt to do your crypto taxes with excel but be prepared to spend many hours on it - generating accurate crypto tax reports is a very time-consuming and elaborate process. Luckily, there are now that can easily do this for you.
DISCLAIMER: I am the co-founder of - a cryptocurrency tax solution that automatically generates your crypto tax reports. The calculations explained above are how we designed Koinly to work.