Work out what a trip costs in fuel, and split it between passengers.
The fuel cost of a journey depends on three things: the distance, your vehicle's fuel economy, and the price of fuel. Divide the distance by your economy to get the fuel used, then multiply by the price. For example, 300 miles at 40 miles per gallon uses 7.5 gallons; at $4 a gallon that is $30. The calculator above does this in your units, whether you measure economy in mpg or litres per 100km.
Real economy is worse than the sticker. Official fuel-economy figures are measured under ideal conditions, so real-world use is usually 10–20% thirstier, more in city stop-start traffic and at high motorway speeds. For budgeting a trip, it is safer to use your own observed economy (fill up, note the miles, refill and do the maths) than the manufacturer's number.
Cutting the cost. Smooth driving, correct tyre pressures, removing roof boxes and easing off the top-end speed all noticeably improve economy. For regular commutes, small savings per trip add up over a year, so it is worth comparing the true cost of routes and driving styles, not just distance.