Fuel gauge inaccurate on 2003 Ford Taurus

Ran out of fuel today as idiot light didn't come on until 12miles prior. Added 1.5 gallons of gas, started car and gauge now showed almost 1/4 tank. Possibly related to occasional "shut-down" of vehicle at traffic light? Is this possibly an electrical issue? Please advise.

Asked by for the 2003 Ford Taurus
more likely the fuel sender malfunction.