Use a quote if you're going to copy-paste and entire article, you're going to get in trouble this way.
I don't know how it works with accounting but that's how it works with Bitcoin. If you know your UTXOs and also know the prices at which you bought them, you basically know which BTC you sell at every time, provided that you have a self custody wallet with coin-control ability. If you keep your Bitcoin in exchanges, then it's a whole other story and you should WITHDRAW YOUR BITCOIN FROM EXCHANGES

Accounting and IRS don't care about inputs or outputs or technical stuff.
It all depends on the taxation that your country uses or, in some cases it has multiple what they let you use.Without OP telling us from where he is this is a shot in the dark
If he is in the US he can use FIFO, first in first out, so if he has bought 10 batches of 10 BTC and decides to sell 5 he will pay tax on the profits compared to the first batch. If he sells 15 he will pay taxes on the first batch profits and on half of the second batch profits. In the UK the last time I checked they allowed Share Pooling so it means the median value of the bought coins versus the selling value.
So, it's all about the country's tax system.
But what if you don't use exchanges? I mean, personally I have stopped using exchanges, but I keep buying Bitcoin P2P. Let's assume that I wanted to declare capital gains, how else would I do it? There is no way

Four hours spent each day for one week at the IRS and you'll come up with a solution.

Remember, it's your problem, not theirs, from their point of view if you can't prove you have paid anything for them then they will claim it's zero so you're going to pay tax on profits for the entire selling value.