Sure. If using the simplified field notation when setting up the calculation for the cost field, it would look like this:
mileage * .56
but you'd replace "mileage" with the actual name of that field. If you want to use JavaScript, it could be:
event.value = getField("mileage").value * .56;