One straightforward way to calucate auto cost per mile (if your only taking fuel consumption into account) is: Price per gallon of fuel divided by the vehicle's average Miles per Gallon.
e.g., $3.80 per gallon / 22MPG = 0.172727 per mile
therefore, it would cost $ 0.173 per mile or 17.3 cents per mile.
Other factors such as vehicle deprecation, tolls, oil use, insurance also should be considered in account but would complicate the equation.