On 09/22/2017 Dave bought 1 BTC for 2,000 USD.He buys 2 BTC for 5,000 USD on 01/06/2018 and then buys 1 BTC for 8,000 USD on 04/19/2018.On 05/03/2018 Dave sold 1 BTC for 4,000 USD.To calculate his capital gains for this disposal, he must decide his cost basis.
The last coin was bought on 04/19/2018 for 8,000 USD, so Dave's cost-basis is 8,000 USD4,000 - 8,000 = -4,000 USD (loss)
The first coin was bought on 09/22/2017 for 2,000 USD, so his cost basis is 2,000 USD.4,000 - 2,000 = +2,000 USD (profit)
The highest purchase price was on 04/19/2018 for 8,000 USD, so his cost basis will be 8,000 USD.4,000 - 8,000 = -4,000 USD (loss)
The lowest purchase price was on 09/22/2017 for 2,000 USD, so his cost basis will be 2,000 USD4,000 - 2,000 = +2,000 USD (profit)