# How to calculate the amount of consumed gas?

If we have the cc of the engine, and its running speed, how can we calculate the mass of gasoline in milligrams sucked in each intake stroke and the mass of gas consumed in a given distance, based on its mass and volume?

• You can't, fuel consumption is based on engine load, not just on revs. – HandyHowie 6 mins ago Nov 26, 2015 at 18:20
• Yah, ask @HandyHowie how we know that is true ;-) Nov 26, 2015 at 18:40
• You'd have to know a lot more information, such as the intake manifold vacuum. The mass calculation is pretty simply, if you can calculate (or measure) the air mass -- it's takes about 14.7 times more air-mass than gasoline-mass for proper combustion. But knowing the air-mass requires knowing what the actual airflow is, which can be measured with a mass airflow sensor (duh) or by computing the airflow curves for steady-state manifold vacuum readings. Or do what one of the answers says and measure actually consumption between fillups. Nov 27, 2015 at 0:47
• @JulieinAustin the trouble with the 14.7:1 assumption is that it won't always be true.
– Zaid
Nov 27, 2015 at 3:08
• @IhavenoideawhatI'mdoing ... No, they use a MAF, MAP, and/or O2's as well to calculate, using the amount of air going into the engine. Remember the long discussion on air intake based on load we all had? Nov 27, 2015 at 11:37

Just a thought of a way to determine what you are looking for...

Your injectors are rated for a certain flow at a certain PSI. Most cars have a Fuel Pressure Regulator to keep this pressure constant relative to the pressure in the manifold. You should be able to find this flow rating for your vehicle's injectors.

Find a way to 'watch' how long the injector is open. This is going to happen is the millisecond range, I'm thinking an arduino using the injector power wire as an input, constantly polling and recording/outputting changes. Not sure if the arduino would be fast/accurate enough. The car is 12v and the arduino needs 5v, so you would need to drop the voltage somehow and use a diode so your reading doesn't effect injector performance.

Once you have a flow rate and how long it is open, you can calculate how much fuel is injected.

• "You should be able to find this flow rating for your vehicle's injectors" - easier said than done! :) Nothing wrong with the approach though, +1
– Zaid
Dec 19, 2015 at 18:23

How about filling the tank, driving it however far and re-filling the tank. The greater the distance travelled, the more accurate the amount of consumption per unit of distance.

• The question is really asking for a mathematical formula for extracting the data based on two factors. As it stands, the question is unanswerable. Nov 27, 2015 at 11:33
• @Paulster2 - Yeah I know. Nov 27, 2015 at 14:10