How to measure profit and losses in bitcoin investment? 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.