Petrol Mileage Calculator

.fuel-calc-container { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; max-width: 800px; margin: 20px auto; padding: 25px; border: 1px solid #e1e1e1; border-radius: 12px; background-color: #ffffff; box-shadow: 0 4px 15px rgba(0,0,0,0.05); color: #333; } .fuel-calc-header { text-align: center; margin-bottom: 30px; } .fuel-calc-header h2 { color: #2c3e50; margin-bottom: 10px; } .fuel-calc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 25px; } @media (max-width: 600px) { .fuel-calc-grid { grid-template-columns: 1fr; } } .fuel-input-group { display: flex; flex-direction: column; } .fuel-input-group label { font-weight: 600; margin-bottom: 8px; color: #444; } .fuel-input-group input { padding: 12px; border: 2px solid #ddd; border-radius: 6px; font-size: 16px; transition: border-color 0.3s; } .fuel-input-group input:focus { border-color: #3498db; outline: none; } .fuel-calc-btn { background-color: #27ae60; color: white; padding: 15px 25px; border: none; border-radius: 6px; font-size: 18px; font-weight: bold; cursor: pointer; width: 100%; transition: background-color 0.3s; } .fuel-calc-btn:hover { background-color: #219150; } #mileage-result-box { margin-top: 30px; padding: 20px; background-color: #f8f9fa; border-radius: 8px; display: none; border-left: 5px solid #27ae60; } .result-item { margin-bottom: 10px; font-size: 18px; } .result-value { font-weight: bold; color: #2c3e50; } .fuel-article { margin-top: 40px; line-height: 1.6; color: #444; } .fuel-article h3 { color: #2c3e50; margin-top: 25px; } .fuel-article p { margin-bottom: 15px; } .fuel-example-table { width: 100%; border-collapse: collapse; margin: 20px 0; } .fuel-example-table th, .fuel-example-table td { border: 1px solid #ddd; padding: 12px; text-align: left; } .fuel-example-table th { background-color: #f2f2f2; }

Petrol Mileage Calculator

Calculate your vehicle's fuel efficiency and running costs instantly.

Fuel Efficiency: 0 km/L
Fuel Cost per km: 0
Total Trip Fuel Cost: 0
Consumption: 0 L/100km

How to Calculate Your Petrol Mileage

Understanding your vehicle's petrol mileage (fuel efficiency) is essential for budgeting and maintaining your car's health. Mileage represents the distance your vehicle can travel per unit of fuel consumed. In most regions, this is measured in kilometers per liter (km/L).

The Petrol Mileage Formula

The math behind fuel efficiency is straightforward. You divide the total distance covered by the total amount of fuel used during that period:

Mileage (km/L) = Total Distance (km) รท Fuel Consumed (Liters)

Example Calculation

If you filled your tank and drove 450 kilometers before needing a refill, and you added 30 liters of petrol to fill it back up, your calculation would be:

450 km / 30 Liters = 15 km/L

Distance (km) Fuel Used (L) Mileage (km/L) Efficiency Rating
100 5 20 km/L Excellent
100 8 12.5 km/L Average
100 12 8.3 km/L Poor

Tips to Improve Your Petrol Mileage

  • Maintain Tire Pressure: Under-inflated tires increase rolling resistance, which consumes more fuel.
  • Smooth Driving: Avoid rapid acceleration and hard braking. Maintaining a steady speed helps significantly.
  • Reduce Weight: Remove unnecessary items from your trunk or roof racks to reduce aerodynamic drag and weight.
  • Regular Servicing: Clean air filters and fresh engine oil ensure the engine operates at peak efficiency.

Why Monitor Fuel Consumption?

Sudden drops in petrol mileage can be an early warning sign of mechanical issues, such as faulty oxygen sensors, spark plug problems, or fuel injector clogs. By using this Petrol Mileage Calculator regularly, you can track your vehicle's performance over time and save money on fuel costs.

function calculatePetrolMileage() { var distance = parseFloat(document.getElementById("distanceTraveled").value); var fuel = parseFloat(document.getElementById("fuelUsed").value); var price = parseFloat(document.getElementById("fuelPrice").value) || 0; var extra = parseFloat(document.getElementById("tripCost").value) || 0; if (isNaN(distance) || isNaN(fuel) || distance <= 0 || fuel <= 0) { alert("Please enter valid positive numbers for distance and fuel consumed."); return; } // Mileage Calculation (km/L) var mileage = distance / fuel; // Consumption per 100km var consumption100 = (fuel / distance) * 100; // Cost Calculations var totalFuelCost = fuel * price; var costPerKm = (totalFuelCost + extra) / distance; // Update UI document.getElementById("resMileage").innerHTML = mileage.toFixed(2); document.getElementById("resConsumption").innerHTML = consumption100.toFixed(2); document.getElementById("resTotalFuelCost").innerHTML = totalFuelCost.toFixed(2); document.getElementById("resCostPerKm").innerHTML = costPerKm.toFixed(2); // Show result box document.getElementById("mileage-result-box").style.display = "block"; }

Leave a Comment