Calculating water tank capacity based on top/middle temp sensor readings

I’ve got sensors working on our water cylinder which read the temperature of water in the tank at the top and in the middle. I’ve been trying to think my way into how I might use this data to calculate a visualisation of water tank (hot water) capacity with no luck at all. I wonder if anyone else has tackled this challenge before?