cost per kilometer
2. Divide vehicle operation costs, $293.83 per month in our hypothetical scenario, by the distance you drive per month, 750 miles (1,207 km) in our example, to calculate the cost per mile. The cost per mile for this hypothetical driver and vehicle is 39.17 cents per mile or 24 cents per kilometer.. Divide the number of miles or kilometers you drove by the number of gallons or liters it took to refill your tank. For example, if you drove 300 miles (482.8 km) and burned 15 gallons (56.78 liters) of gasoline, your vehicle got about 20 miles per gallon (8.5 km per liter).