This question already has an answer here:
I want to know how can i obtain the values of Fuel Consumption, Fuel Economy and other fuel related information from basic OBD-II parameters like Vehicle Speed, RPM, TPS etc. I have noticed that not many vehicles support Fuel related PIDs so i want to obtain these values from available parameter values.
EDIT: I referred this paper www.sersc.org/journals/IJUNESST/vol4_no4/3.pdf . Formula given here is quite simple but is not universal for all cars.