Summary: I describe a simple method for accurately calculating the gain/loss for each coin in your portfolio in USD (or any other FIAT currency). I provide a spreadsheet document for the calculation.
Also, I show you how you can use the free app, BitcoinCrazyness, to automatically do that for you.
Disclaimer: I’m the developer of the BitcoinCrazyness app.
Let me begin by a quick example.
Suppose today, the prices are:
How much is your gain/loss for ETH in USD?
For simplicity, assume there is no transaction fees.
Naive Calculation:
Your gain in BTC is:
0.0799 - 0.07= 0.0099 BTC
In order to convert your gain to USD, we multiply the gain in BTC to today’s value of BTC in USD:
0.0099 x 11,837.5 = $117.19
However, this is not the true value of your gain, because the value of BTC changed from the day you bought it several times.
The above calculation completely ignores and is independent of the cost of BTC.
A More Accurate Calculation:
The average cost of each unit of BTC is $7,000 since you bought one unit at $8,000, and one at $6,000.
When you buy 1 ETH for 0.07 BTC, you really are paying:
0.07 × $7000 = $490
Since ETH/USD is now $935.45, your gain would be:
$935.45 - $490 = $445.45
So, your gain is really $445.45, not $117.19.
The following image shows the accurate values for each of your coins:
Explanation:
You can do similar calculations either using the free BitcoinCrazyness App, or using this spreadsheet.
Now assume you use your ETH from the previous example and buy some more coins with it. In particular, assume the following is the summary of your transactions:
What is the cost for XMR and LTC?
Solution: each ETH costs you $490. Therefore the cost for XMR and LTC in USD is 0.33 × 490 = $161.7 and 0.25 × $490 = $122.4 respectively.
You can see the gains for each currency in the following picture:
Gain Calculation for Each Coin in USD
In short, gain/loss calculation is not too complicated, but it should account for the average cost of each coin for each transaction. Moreover, it should account for transaction fees.
The BitcoinCrazyness app was started based on the above simple idea. It is a free app that calculates the average cost of each coin and therefore calculates the true gain/loss for each currency in USD and several other FIAT currencies.
In order to enter the transactions quickly, it accepts a CSV file. CSV stands for Comma Separated Value, which is a text file that can be generated from an excel sheet.
Screenshots for BitcoinCrazyness App
The CSV file for the above examples are given at the end of this article.
CSV File Format:
Each trade is specified in one row of the CSV file which has the following columns:
from,to,type,unitBuyPrice,quantity,useHolding,feeCost,feeCurrency
The following picture shows the output of the app for an even more complicated example with transaction fees:
from,to,type,unitBuyPrice,quantity,useHolding,feeCost,feeCurrency
USD,USD,buy,1,100000,false,0,NA
BTC,USD,buy,14000,2,true,500,USD
BTC,USD,buy,10000,2,true,500,USD
BTC,BTC,buy,10000,2,false,0,NA
REQ,BTC,buy,0.00001,20000,true,20,REQ
ETH,BTC,buy,0.01,20,true,0.02,ETH
TRX,BTC,buy,0.00001,45000,true,0.2,TRX
BTC,BTC,sell,10000,0.1,true,0,NA
BTC,BTC,sell,10000,0.2,true,0,NA
The Gain/Loss Calculation with Transaction Fees using the BitcoinCrazyness app
Gain/loss calculation should account for the average cost of each coin for each transaction. The transactions should be entered in a chronological order.
If you liked this article please share, comment, and click on the clap icon a few times. I would love to know how you calculate your gain and loss and if you have any feedback for the BitcoinCrazyness app.
Besides gain/loss calculations, the BitcoinCrazyness app provides advanced trailing delta price alerts, latest prices for thousands of coins, and advanced coin queries.
The CSV files for the first example:
from,to,type,unitBuyPrice,quantity,useHolding,feeCost,feeCurrency
BTC,USD,buy,8000,1,false,0,USD
BTC,USD,buy,6000,1,false,0,USD
ETH,BTC,buy,0.07,1,true,0,ETH
The CSV file for the second example:
from,to,type,unitBuyPrice,quantity,useHolding,feeCost,feeCurrency
BTC,USD,buy,8000,1,false,0,USD
BTC,USD,buy,6000,1,false,0,USD
ETH,BTC,buy,0.07,1,true,0,NA
XMR,ETH,buy,0.33,1,true,0,NA
LTC,ETH,buy,0.25,1,true,0,NA