Calculate MPG in Excel: Easy Steps & Formulas

Montreal Jul 09, 2026

Ever found yourself wondering how to calculate miles per gallon (mpg) for your vehicle, but struggled with the math? Excel can simplify this process, allowing you to calculate mpg with just a few clicks. Let's dive into how you can calculate miles per gallon in Excel, making your fuel efficiency tracking a breeze.

How to Calculate Gas Mileage in Excel | Techwalla
How to Calculate Gas Mileage in Excel | Techwalla

Before we begin, ensure you have Excel open and ready. We'll be using simple formulas and functions, so no advanced knowledge is required. Let's get started!

Gas Mileage Log and Calculator
Gas Mileage Log and Calculator

Understanding the Formula

Calculating mpg in Excel involves a simple formula: mpg = miles driven / gallons used. Let's break this down.

Excel IFTA Calculator for Miles and Gallons per State
Excel IFTA Calculator for Miles and Gallons per State

You'll need two pieces of information: the total miles driven and the total gallons of fuel used. Once you have these, you can plug them into the formula to find your mpg.

Inputting Your Data

Miles Per Gallon Calculator
Miles Per Gallon Calculator

Open a new or existing Excel workbook. In the first two columns (A and B), enter the following headers: "Miles Driven" and "Gallons Used".

Now, enter your data in the respective columns. For example, if you've driven 300 miles and used 12 gallons of fuel, enter these figures in the next two rows (e.g., A2: 300, B2: 12).

Calculating mpg

the gas mileage tracker in excel
the gas mileage tracker in excel

In the next column (C), enter the following formula: "=A2/B2". This calculates the mpg for the data in rows 2.

To apply this formula to all your data, click and drag the small square in the bottom-right corner of cell C2 down to the last row of data. This will automatically calculate the mpg for each entry.

Tracking Your mpg Over Time

IFTA Calculator for Miles, Gallons, & Fuel Cost Per State
IFTA Calculator for Miles, Gallons, & Fuel Cost Per State

To monitor your vehicle's fuel efficiency, you can track your mpg over time. Let's see how to do this.

In a new sheet or workbook, set up your headers as follows: "Date", "Miles Driven", "Gallons Used", and "mpg".

Fuel Consumption Log Template for MS EXCEL & Calc | Document Hub
Fuel Consumption Log Template for MS EXCEL & Calc | Document Hub
Gas Mileage and Business Expense Form Template
Gas Mileage and Business Expense Form Template
MPG & Fuel Cost Calculator Spreadsheet | Easily and accurately calculate actual MPG and fuel cost per mile | Microsoft Excel file download
MPG & Fuel Cost Calculator Spreadsheet | Easily and accurately calculate actual MPG and fuel cost per mile | Microsoft Excel file download
Mileage Tracking & Calculating Excel Form
Mileage Tracking & Calculating Excel Form
Gas Mileage Tracker Excel Template: Track Fuel Costs, MPG, and Expenses. Calculate Gas Cost per Gallon. Mileage Log Sheet. Mileage Work Trip
Gas Mileage Tracker Excel Template: Track Fuel Costs, MPG, and Expenses. Calculate Gas Cost per Gallon. Mileage Log Sheet. Mileage Work Trip
Gas Mileage Log and Calculator
Gas Mileage Log and Calculator
Printable Mileage Calculator
Printable Mileage Calculator
Gas Mileage Tracker. Mileage Log Sheet. Auto Calculate Excel Spreadsheet & Google Sheets. Work Gas Tracker. Mileage Work Trip. Driving Log.
Gas Mileage Tracker. Mileage Log Sheet. Auto Calculate Excel Spreadsheet & Google Sheets. Work Gas Tracker. Mileage Work Trip. Driving Log.
250+ Free Excel Templates: Finance, Accounting, Business, Calendar, & More - ExcelDemy
250+ Free Excel Templates: Finance, Accounting, Business, Calendar, & More - ExcelDemy
Fuel Tracking Spreadsheet Excel | Vehicle Log & Cost Tracker (Digital Download)
Fuel Tracking Spreadsheet Excel | Vehicle Log & Cost Tracker (Digital Download)
Fuel Cost Log Template Excel & Google Sheets | Mileage Tracker | Gas Expense Log for Car, Truck, Fleet | Travel and Fuel Budget Tracker
Fuel Cost Log Template Excel & Google Sheets | Mileage Tracker | Gas Expense Log for Car, Truck, Fleet | Travel and Fuel Budget Tracker
Owner Operator Trucking Spreadsheet | IFTA Calculator, Cost Per Mile & Load Tracker | Trucking Business Accounting | Excel + Google Sheets
Owner Operator Trucking Spreadsheet | IFTA Calculator, Cost Per Mile & Load Tracker | Trucking Business Accounting | Excel + Google Sheets
Gas Mileage Tracker Template | Editable Excel Spreadsheet | Vehicle Fuel Log & Car Expense Sheet | Instant Download XLSX
Gas Mileage Tracker Template | Editable Excel Spreadsheet | Vehicle Fuel Log & Car Expense Sheet | Instant Download XLSX
Fuel Consumption Tracker - MS Excel Spreadsheet Template (track your MPG)
Fuel Consumption Tracker - MS Excel Spreadsheet Template (track your MPG)
Fuel Cost Log Spreadsheet Excel Google Sheets | Mileage Tracker Gas Expense Fleet MPG Dashboard IRS Reimbursement Report
Fuel Cost Log Spreadsheet Excel Google Sheets | Mileage Tracker Gas Expense Fleet MPG Dashboard IRS Reimbursement Report
Mike Tholfsen - Microsoft tips on TikTok
Mike Tholfsen - Microsoft tips on TikTok
Mileage Log Template (Purple) | Excel & Google Sheets | Track Business Miles + Tax Deductions | Small Business | Instant Download
Mileage Log Template (Purple) | Excel & Google Sheets | Track Business Miles + Tax Deductions | Small Business | Instant Download
Mileage Tracker - Excel Template and printable forms - Calculate mileage deduction,  Car Repair costs, Fuel, Meals, Parking, and Toll Fees
Mileage Tracker - Excel Template and printable forms - Calculate mileage deduction, Car Repair costs, Fuel, Meals, Parking, and Toll Fees
107K views · 1.5K reactions | Calculating Worked Hours Using Formula!! #Excel | Excelling At Excel
107K views · 1.5K reactions | Calculating Worked Hours Using Formula!! #Excel | Excelling At Excel
Time Sheet Calculator in Excel
Time Sheet Calculator in Excel

Entering Your Data

In the "Date" column, enter the dates you want to track. In the "Miles Driven" and "Gallons Used" columns, enter the respective data for each date.

In the "mpg" column, enter the formula "=B2/C2" (assuming your data starts in row 2). This will calculate the mpg for each entry automatically.

Analyzing Your Data

With your mpg data tracked over time, you can now analyze your vehicle's fuel efficiency. Use Excel's built-in tools, such as charts and graphs, to visualize your data and identify trends.

To create a line chart, select your data, then click on "Insert" > "Line" in the toolbar. Customize your chart as desired.

Now that you know how to calculate miles per gallon in Excel and track your fuel efficiency over time, you can make informed decisions about your driving habits and vehicle maintenance. Happy tracking!