How to calculate fuel?

What is the formula used to calculate cost per mile based on fuel usage only? Miles driven divided by MPG = gallons used. Gallons used multiplied by price per gallon = total price spent for miles driven. Total cost divided into total miles = cost per mile. Example:...