Erratic fuel gauge

You likely have an aftermarket sender. They are not designed the same as the original. You will likely not fix the problem by replacing it. There is a device called a meter match that I used to fix mine. Look for fuel or gas gauge (senders) threads on here. There is a lot of info, as this is a common issue.
Correct answer. I also refill gas by mileage.