I think you need an average price spreadsheet.

How it works?

When you buy bitcoins you write down the price you paid, the amount of tokens you got. With that you can calculate your average prices.
Your total average price is the total amount of money spent divided by the total amount of tokens you got.
Your average price by transaction is the money you spent (including fees and taxes) divided by the tokens you got on that transaction

What if I sell?

Sells don't affect your average price, only purchases.

How much does my bitcoins are worth?

Just multiply your tokens by the current price of Bitcoin.
The link below talks about stocks, but the same principles apply to bitcoin. https://www.fool.com/investing/how-to-invest/stocks/how-to-calculate-average-stock-price/
Sells don't affect your average price, only purchases.
You may want to give this a bit more thought
reply
How selling changes my prices (costs)? I don't get it.
reply
Most people are probably only interested in coins still in their inventory.
If you buy 1 BTC for $10, sell it for $100, then buy another at $1000, do you consider your average price $505 or $1000?
reply
My bad, it was supposed to be Weighted Average instead of average price.
reply