Not really sure I'm answering your question but if you're just looking to get the gas mileage you got on the last tank of gas it would be something like Tripmeter_Reading / Gas_bought = Mileage. For instance, I filled up this morning and put 9.6 gallons of gas in my car and my Tripmeter read 330 miles so 330 / 9.6 = 34.38.