i think that on most cars they only work by comparing current speed, rpm, and throttle input or vacuum. honestly i don't think any of them are at all precise, just a general idea.
What good is an instantaneous MPG? I gives you knowledge for how you drive. If you want to run for miles per tank you strive to keep the instantaneous reading above average. That means you make a choice to only press this far into the accelerator to go faster. One of the readings I use often is the amount of throttle open. LOD on the gauge, think load. If I am on the straight and narrow stretch and want to bump it up by 5 or 10 mph and I only push the accelerator down to get a reading of 70% on the gauge I get 24 mpg on the instant reading. Push to 90 and I get 14. Do I need to get to speed that fast? Maybe but I pay for it on the average side. So mostly it is a reminder that it is your choice to get there in a hurry or save a few bucks and burn the time. I find the current built in meters to be fairly accurate so I use them on our fleet trucks. It does give one something else to look at besides the road and keeps me alert. Just a couple reasons to have one. If so inclined.