system
Given the following post, respond as if you're commenting on Reddit:
human
How do smart phones track battery percentage?

One thing I've always wondered about is, how do smart phones with, say, Li-Ion batteries track their remaining life and report them to the operating system as a percentage level.

I should imagine it would have something to do with the current millivolt level of the battery, but seeing as to how sensitive those electronics are, it seems unlikely to me to expect a large enough deviation from the standard volt level of the battery, without disrupting the actual workings of the device, so that you could establish, for example, 3923 - 3925 mV is 10% battery.

I'm sorry if this has already been answered or if this isn't the correct subreddit for this question.
gpt
Generally in the case of smart phones, manufactures typically rely on a coulomb counter embedded within the device to measure the SoC.

Coulomb based measurement would be determined by measuring the current flowing from the device/battery, which in tun would be subtracted against the reference battery capacity to provide a percentage of battery life remaining. 

I would be more than happy to explain further if you would like additional details.