If I buy BTC at $1,200 and then sell it at $1,500 it is clear that I have made a profit of $300 minus the exchange fee. If I keep buying BTC at the same price over and over, and the price keeps increasing, I can measure all my gains in a similar way: just subtracting the current rate minus the price I have bought the BTC at. However, how can I measure profit or losses when buying BTC at different prices?

For example, say I bought 1 BTC at $1,200 and then 1 BTC at $1,500. If I sell 1 of these 2 BTC at $2,000, what buying price should I measure this sell against, $1,200 or $1,500, to calculate my profit. Maybe an average or weighted average of the prices? Am I missing something basic?


I am no expert in finances, but I look at profit calculation of investment in fungible goods in the way shown below:

Total Profit(between time t1 and time t2) = Total assets at t2 - Total assets at t1

Your total assets at time t would be your fiat in USD at time t + value in USD of your BTC at time t.

Total assets at t1 = $1200 + $1500 = $2700 (When you bought 2 btc)

Total assets at t2 = *$0 + $2000*2 = $4000* (Just before selling 1 btc at $2000)

Total assets at t3 = *$2000 + $2000*1 = $4000* (After selling 1 btc at $2000)

Total Profit = ($2000 + 1btc) - ($1200 + $1500) = (1btc - $700) which depends on bitcoin price.

Instead of talking of profit per transaction, it is better to talk in terms of timestamps. Profit earned between t1 and t2 is $1300 and between t2 and t3 is $0.

If it were 2 distinct houses, which you bought at $1200 and $1500, then it made sense to calculate profit on the house which you sold, but because of fungible(almost) nature of bitcoin it makes sense to look at it as mentioned above.


Plot your settled cash plus unsettled bitcoin on a scatter plot with time on the horizontal and quantity on the vertical. You start with value 1200, and say your final value at the moment is 1800. The gain of N trades is:

(NewestNumber - OldestNumber) / OldestNumber

which will change over time as you experience losses and gains. At time step 1 your gain is:

(1500.0-1200.0)/1200.0  =  0.25% gain  

But later on after a few bad and good trades combined with your lack of a masters degree level securities market post secondary education reveals your inadequacy, your portfolio becomes 900.

(900.0-1200.0)/1200.0  =  -0.33 gain.  

I suggest you take a "masters degree level stock market trading course" if you're really interested in this stuff. It addresses all of this and more, and heck maybe you can write your master's thesis in this and make a contribution to the field of mathematics.

I suggest computational investing with Tucker Balch: https://www.coursera.org/learn/computational-investing/lecture/8WaUv/assess-and-optimize-a-portfolio-overview-part-1

Not the answer you're looking for? Browse other questions tagged or ask your own question.