To calculate mileage we divide the miles traveled by the amount of fuel used to fill the tank. For example, if the trip shows 200 miles since you last filled up, and it took 15 gallons to refill the tank, we divide 200 by 15.