Question: How to accurately calculate battery % left?

Is there another better/more sophisticated way to measure current other than to pass the current through a resistor and measure the voltage drop across it?