This will work for Miles/Gallons or Kilometres/Litres.
Calculate the mileage and cost of fuel based on odometer reading and a tank of fuel.
For this to work you need to write down the odometer reading the first time you fill up and the cost per gallon/litre of your fuel at this time. After driving for a while and it is time to fill up again take a second odometer reading and the amount of fuel needed to re-fill your vehicle's tank.