Why a car’s fuel gauge can move when you park on a hill
Park nose-up on a slope, turn the car off and compare the fuel gauge when you start again on level ground. Depending on the vehicle, you may notice a small difference even though hardly any fuel was used. The sender in the tank measures the position of fuel at one place. The display has to turn that information into an estimate for the whole tank.
Inside a fuel-level sender
One common design uses a float on an arm. As fuel rises, the float lifts and moves an electrical contact along a resistor. Changing the resistance gives the electronics a position reading. Think of it as knowing how high a dipstick is wet, then using the tank’s shape to work out roughly how much liquid that height represents.
Car tanks often fit around other hardware. A wide part of a tank may hold more fuel for each centimeter of height than a narrow part, so a given movement of the float does not always represent the same number of liters. The dashboard or another controller can account for the tank’s shape when it maps the reading to the gauge.
Why the needle stays fairly calm in traffic
Fuel shifts as the car turns or goes uphill. A raw height reading could move with every corner, so vehicles can smooth changes before displaying them. The result is a gauge you can glance at without seeing a different level every few seconds. A longer stop on a slope can still affect what it shows. Ford, for example, notes in one owner’s manual that the gauge may vary slightly while the vehicle moves on a gradient.
The bars or needle are most useful as a quick sense of how much fuel is left. Halfway on the display cannot tell you how many kilometers remain without another piece of information: how quickly the vehicle is using fuel. That is the job of the separate range estimate.