Why all this folderol?
You keep a log book. Or in Excel.
Just list mileage at which you bought x gallons.
Long term averaging gives you an accurate MPG.
In Excel I actually calculate
(1) MPG since last fill
(2) MPG average over last 5 fills
(3) MPG average over last 25 fills
Makes it easy to spot when you need a tune-up... rarely now-a-days. But you can easily spot needs for PCV valve change or clogged gas or air filters. ...Jim Thompson