Oblicz koszt paliwa dla dowolnej podróży.
Fuel cost calculation is straightforward: Fuel needed = Distance / Fuel efficiency, then Cost = Fuel needed × Price per unit.
In MPG (US): Fuel (gallons) = Miles / MPG. Example: 500 mile trip at 30 MPG at $3.50/gallon → 500/30 = 16.67 gallons × $3.50 = $58.33.
In L/100km (metric): Fuel (liters) = Distance(km) × L/100km / 100. Example: 500 km trip at 8 L/100km at $1.50/liter → 500 × 8/100 = 40 liters × $1.50 = $60.00.
To convert: 1 MPG ≈ 235.21 / L/100km. So 30 MPG ≈ 235.21/30 = 7.84 L/100km. Fuel efficiency affects trip cost significantly — improving from 20 MPG to 30 MPG saves 33% on fuel costs for the same trip.