Question: How to accurately calculate battery % left?

Or an even smaller value to reduce the power dissipated and increase circuit efficiency