Typically when you see this behaviour the battery is pretty worn and nearing its useful life.
That being said, and without knowing specifics of the "fuel gauge" in this example, the general procedure to re-calibrate the fuel gauge is:
1. Plug the charger and let it reach 100%, then let it stay at 100% for a few hours. It's important not to unplug during this time but you can use the laptop normally during this time.
2. Remove the charger and let the battery discharge to zero through normal use. Do not re-plug the charger at any time, but it's OK to shutdown the laptop during the discharge phase.
=> Note: Since the OS may shutdown before it reaches 0%, you can boot into BIOS and let it discharge the remaining amount until it shuts off due to no remaining battery capacity. Also, it's recommended to reduce the load, such as using low screen brightness, when you reach the end of the discharge cycle. A high discharge current on a weak battery will lead to an earlier shutdown.
3. Let the battery "rest" in this fully discharged state for a few hours before you plug in the charger. I usually let it sit in this state overnight then let it charge back to 100%. It may be needed to repeat the cycle a few times, but take note that each full charge/discharge cycle further wears the battery.
Here's the science behind it: The fuel gauge typically has a small microprocessor that monitors the battery during charging and discharging cycles in order to predict the capacity. As the battery ages and/or if there are not sufficient discharge cycles (20-100%), it can lose calibration leading to sudden shutdowns at seemingly high states of charge (battery %). Even though the battery is at 0% and the system won't turn on, there is usually enough energy in the battery to power the fuel gauge which allows it to re-calibrate at the 0% level. It will then relearn the low and the high capacity states.
This procedure works for most Apple and Dell products, but may vary depending on the battery manufacturer.