On-Line Gasoline MPG Calculator (Using MAF and/or MAP/IAT/RPM)
You may find this useful for "checking your work".
As many of you have discovered---based on comments here and email that I regularly receive---getting all the units and calculations exactly right can be hard. And, in an embedded system without floating-point support, avoiding integer overflow errors can proved difficult.
Bruce D. Lightner