When you click on links to various merchants on this site and make a purchase, this can result in this site earning a commission. Affiliate programs and affiliations include, but are not limited to, the eBay Partner Network.
I believe it uses actual miles travelled and the injector pulse width.
Bingo! We have a winner.
There's a table in the PCM for injector flow rate (grams/second) versus manifold vacuum. Using the flow rate and the injector pulse width (in msec's) the PCM knows exactly (as long as the flow rate table is correct) how many grams of fuel is being squirted into each cylinder, per second.
Your MPG readings can become flaky if a tuner gets lazy and doesn't set the IFR table properly. When an AFR is off by say 10%, it's quicker to add/subtract that 10% from the fuel table, rather than adjust both the fuel and the air tables.