IFTA Mileage Calculator - CSV Import Guide
Fuel Log CSV Format
Required Columns
Your fuel log CSV must include these columns in this exact order:
| Column | Description | Format | Example |
|---|---|---|---|
| `date` | Date of fuel purchase | `YYYY-MM-DD` | `2026-01-15` |
| `jurisdiction` | State or province where fuel was purchased | Full name | `California`, `Ontario` |
| `gallons` | Amount of fuel purchased | Decimal number | `120.5`, `95.2` |
| `price_per_gallon` | Cost per gallon at the pump | Decimal number | `3.89`, `4.25` |
| `total_cost` | Total cost of purchase | Decimal number | `468.75`, `404.70` |
Example Fuel Log CSV
date,jurisdiction,gallons,pricepergallon,totalcost
2026-01-15,California,120.5,3.89,468.75
2026-01-18,Nevada,95.2,3.65,347.48
2026-01-22,Arizona,110.0,3.45,379.50
2026-01-25,New Mexico,88.3,3.55,313.47
2026-01-28,Texas,125.6,3.25,408.20
2026-02-01,Oklahoma,102.4,3.35,343.04
2026-02-05,Kansas,97.8,3.50,342.30
Formatting Rules
- Include headers: The first row must contain column names exactly as shown
- Date format: Use
YYYY-MM-DD(ISO 8601 format)
2026-01-15
- Incorrect: 01/15/2026, 15-Jan-2026, 1/15/26
- Jurisdiction names: Use full state/province names exactly as they appear in the tool
California, Ontario, British Columbia
- Incorrect: CA, Calif, Cali, ON
- Numbers: Use decimal notation (no currency symbols, commas, or units)
120.5, 3.89
- Incorrect: 120.5 gal, $3.89, 3,89 (European format)
- No blank rows: Remove empty rows from your CSV
- UTF-8 encoding: Save the file as UTF-8 (most spreadsheet software does this by default)
Jurisdiction Names
Use these exact names for jurisdictions:
United States (48 states):
Alabama, Arizona, Arkansas, California, Colorado, Connecticut, Delaware,
Florida, Georgia, Idaho, Illinois, Indiana, Iowa, Kansas, Kentucky,
Louisiana, Maine, Maryland, Massachusetts, Michigan, Minnesota,
Mississippi, Missouri, Montana, Nebraska, Nevada, New Hampshire,
New Jersey, New Mexico, New York, North Carolina, North Dakota, Ohio,
Oklahoma, Oregon, Pennsylvania, Rhode Island, South Carolina,
South Dakota, Tennessee, Texas, Utah, Vermont, Virginia, Washington,
West Virginia, Wisconsin, Wyoming
Canada (10 provinces):
Alberta, British Columbia, Manitoba, New Brunswick, Newfoundland and Labrador,
Nova Scotia, Ontario, Prince Edward Island, Quebec, Saskatchewan
Note: Alaska, Hawaii, and Canadian territories (Yukon, Northwest Territories, Nunavut) are not part of IFTA.
Creating a Fuel Log CSV
Using Excel or Google Sheets:
- Create a new spreadsheet
- Add column headers in row 1:
date | jurisdiction | gallons | pricepergallon | totalcost
- Fill in data rows below headers
- Save/Export as CSV:
Using a text editor:
- Open a plain text editor (Notepad, TextEdit, VS Code)
- Type the headers and data rows:
date,jurisdiction,gallons,pricepergallon,totalcost
2026-01-15,California,120.5,3.89,468.75
- Save as
.csvfile
Exporting from fuel card systems:
Many fuel card providers (e.g., Comdata, WEX, EFS) allow CSV export of transactions. You may need to:
- Export transactions for the quarter
- Rename columns to match the required format
- Convert date format to
YYYY-MM-DD - Map location codes to full jurisdiction names
Importing a Fuel Log CSV
- Go to the Fuel Logs tab
- Click "Import from CSV"
- Select the truck you're importing for
- Click "Choose File" and select your CSV
- Click "Upload"
What happens:
- The tool validates the CSV format
- Each row is imported as a fuel log entry
- You'll see a success message with the number of entries imported
- The entries appear in your fuel logs table
If there's an error:
- You'll see an error message explaining the issue
- Common errors: invalid date format, missing columns, unrecognized jurisdiction
- Fix the error in your CSV and try again
Mileage CSV Format
Required Columns
Your mileage CSV must include these columns in this exact order:
| Column | Description | Format | Example |
|---|---|---|---|
| `jurisdiction` | State or province | Full name | `California`, `Ontario` |
| `miles` | Miles driven in that jurisdiction | Decimal number | `1250`, `450.5` |
Example Mileage CSV
jurisdiction,miles
California,1250
Nevada,450
Arizona,680
New Mexico,320
Texas,1540
Oklahoma,275
Kansas,410
Missouri,380
Illinois,920
Indiana,540
Ohio,615
Pennsylvania,780
New York,425
Formatting Rules
- Include headers: The first row must contain column names exactly as shown
- Jurisdiction names: Use full state/province names (see list in Fuel Log section)
- Numbers: Use whole numbers or decimals (no commas, units, or symbols)
1250, 450.5
- Incorrect: 1,250, 450.5 mi, 1250 miles
- Only include jurisdictions you traveled through - No need to list all 58 jurisdictions if you only traveled through 10
- No duplicate jurisdictions - Each jurisdiction should appear only once
- No blank rows: Remove empty rows
Creating a Mileage CSV
Using Excel or Google Sheets:
- Create a new spreadsheet
- Add column headers in row 1:
jurisdiction | miles
- Fill in data rows (only jurisdictions you traveled through)
- Save/Export as CSV
From ELD systems:
Many Electronic Logging Devices (ELDs) can export mileage reports by state. You may need to:
- Generate a state-by-state mileage report for the quarter
- Export to CSV or Excel
- Reformat to match the required columns
- Convert state abbreviations to full names (e.g.,
CA→California)
Tip: Create a template CSV with jurisdiction names pre-filled and save it. Each quarter, copy the template and fill in the miles column.
Importing a Mileage CSV
- Go to the Mileage tab
- Click "Import from CSV"
- Select the truck you're importing for
- Select the quarter (e.g., Q1 2026)
- Click "Choose File" and select your CSV
- Click "Upload"
What happens:
- The tool validates the CSV format
- Mileage for each jurisdiction is imported
- Any existing mileage for that truck/quarter is overwritten
- You'll see a summary of total miles imported
Important: CSV import overwrites existing mileage. If you've already entered mileage manually, it will be replaced with the CSV data.
Tips and Best Practices
Use CSV Templates
Create template files with headers and sample data, then:
- Save templates in a folder (e.g., "IFTA Templates")
- Each quarter, copy the template and fill in new data
- This ensures consistent formatting every time
Sample template files:
fuel-log-template.csv:
date,jurisdiction,gallons,pricepergallon,totalcost2026-01-01,California,0,0,0
mileage-template.csv:
jurisdiction,miles
California,0
Nevada,0
Arizona,0
Replace 0 values with actual data each quarter.
Validate Before Importing
Before uploading, double-check:
- [ ] Column headers match exactly
- [ ] Date format is
YYYY-MM-DD - [ ] Jurisdiction names are spelled correctly (no abbreviations)
- [ ] Numbers have no commas, symbols, or units
- [ ] No blank rows
- [ ] No duplicate entries (fuel logs) or jurisdictions (mileage)
Tip: Import a small test file (2-3 rows) first to verify formatting before uploading hundreds of entries.
Convert Spreadsheet Data
If you track data in Excel or Google Sheets:
- Rename columns to match required headers
- Format dates:
YYYY-MM-DD
- Format numbers:
- Map jurisdictions:
- Export as CSV:
Handle Special Cases
Fuel purchased outside IFTA jurisdictions (Alaska, Hawaii):
- Do not include in your fuel log CSV
- These jurisdictions are not part of IFTA
- IFTA does not apply to fuel purchased or miles driven there
Canadian fuel purchases (litres vs gallons):
- Convert litres to gallons before importing (1 gallon = 3.78541 litres)
- Example: 100 litres ÷ 3.78541 = 26.42 gallons
- Use the converted gallon amount in your CSV
Mixed fuel types (diesel and gasoline):
- Create separate CSVs for each fuel type
- Import separately for trucks that use different fuel types
- Make sure the truck's fuel type setting matches the CSV data
Dates spanning multiple quarters:
- Only import data for the quarter you're reporting
- Filter your source data by date range before exporting to CSV
- Example: Q1 2026 should only include dates from 2026-01-01 to 2026-03-31
Common Errors and Solutions
Error: "Invalid date format"
Cause: Date column is not in YYYY-MM-DD format
Solution:
- Reformat dates to
YYYY-MM-DD - Check for dates like
01/15/2026or15-Jan-2026 - In Excel: Format cells as Custom
YYYY-MM-DDbefore exporting
Error: "Unrecognized jurisdiction"
Cause: Jurisdiction name doesn't match the tool's jurisdiction list
Solution:
- Check spelling and capitalization (e.g.,
californiashould beCalifornia) - Don't use abbreviations (e.g.,
CAshould beCalifornia) - Remove extra spaces before or after jurisdiction names
- Refer to the jurisdiction name list in this guide
Error: "Missing required columns"
Cause: Column headers don't match the required format
Solution:
- Check for typos in column names (e.g.,
galloninstead ofgallons) - Make sure all required columns are present
- Column order doesn't matter, but names must match exactly
- Headers are case-sensitive:
date, notDateorDATE
Error: "Invalid number format"
Cause: Number columns contain non-numeric characters
Solution:
- Remove currency symbols (
$,£,€) - Remove units (
gal,mi,miles) - Remove thousands separators (
,) - Use
.as decimal separator (not,) - Example: Change
3,89to3.89,$120.50to120.50
Error: "Duplicate jurisdiction"
Cause: (Mileage CSV only) The same jurisdiction appears multiple times
Solution:
- Each jurisdiction should appear only once in the mileage CSV
- If you have duplicate rows, combine the miles and keep one row
- Example: Two rows for
Californiawith500and750miles → one row with1250miles
Error: "CSV file too large"
Cause: CSV file exceeds upload size limit
Solution:
- Split the CSV into smaller files and import separately
- Most tools accept up to 1,000-5,000 rows per file
- Remove unnecessary columns (only include required columns)
- Compress the CSV (most systems accept .zip files)
Error: "Import failed - no data"
Cause: CSV is empty or only contains headers
Solution:
- Make sure you have at least one data row below the headers
- Check that you exported the correct sheet/tab from Excel
- Open the CSV in a text editor to verify content
Sample CSV Files
Sample Fuel Log CSV (10 entries)
date,jurisdiction,gallons,pricepergallon,totalcost
2026-01-05,California,115.2,3.95,455.04
2026-01-08,Nevada,98.5,3.75,369.38
2026-01-12,Utah,105.3,3.55,373.82
2026-01-15,Colorado,92.7,3.45,319.82
2026-01-18,Kansas,110.5,3.35,370.18
2026-01-22,Missouri,88.9,3.25,289.93
2026-01-25,Illinois,120.4,3.85,463.54
2026-01-28,Indiana,95.6,3.65,349.04
2026-02-01,Ohio,102.3,3.75,383.63
2026-02-05,Pennsylvania,118.7,4.05,480.74
Sample Mileage CSV (15 jurisdictions)
jurisdiction,miles
California,1450
Nevada,520
Utah,680
Colorado,750
Kansas,480
Missouri,390
Illinois,820
Indiana,560
Ohio,640
Pennsylvania,720
New York,380
New Jersey,210
Maryland,180
Virginia,290
North Carolina,410
Converting from Other Formats
From Excel to CSV
- Open your Excel file
- Select the worksheet with your data
- Rename columns to match required headers
- Format dates as
YYYY-MM-DD - Format numbers without currency symbols or thousands separators
- File > Save As
- Choose file type: CSV (Comma delimited) (.csv)
- Click Save
- If Excel warns about features not supported, click Yes to continue
From Google Sheets to CSV
- Open your Google Sheet
- Rename columns to match required headers
- Format dates as
YYYY-MM-DD(Format > Number > Custom >YYYY-MM-DD) - Format numbers as plain numbers (no currency)
- File > Download > Comma Separated Values (.csv)
- The file downloads to your computer
From QuickBooks to CSV
- Export your fuel expense report
- Open in Excel or Google Sheets
- Map columns:
Transaction Date → date
- Vendor/Location → jurisdiction (you may need to manually add state/province)
- Amount → Extract gallons and price from description or memo
- Reformat and export as CSV
From Fuel Card Reports
Most fuel card providers (Comdata, WEX, EFS) allow transaction exports:
- Log in to your fuel card account
- Generate a transaction report for the quarter
- Export as CSV or Excel
- Open in a spreadsheet program
- Map columns to required format:
date
- Location (state) → jurisdiction (convert abbreviations to full names)
- Quantity → gallons
- Unit price → pricepergallon
- Total amount → totalcost
- Export as CSV
From ELD Systems
Electronic Logging Devices often provide mileage reports by state:
- Log in to your ELD provider's portal
- Generate a state mileage report for the quarter
- Export as CSV or Excel
- Open in a spreadsheet program
- Map columns:
jurisdiction (convert abbreviations to full names, e.g., CA → California)
- Miles → miles
- Remove any non-IFTA jurisdictions (Alaska, Hawaii, etc.)
- Export as CSV
Tip: Some ELD systems provide IFTA-ready reports that may already be in the correct format or very close to it.
Need More Help?
- Getting Started Guide: Learn the basics of using the tool
- User Guide: Detailed documentation for all features
- FAQ: Common questions and answers
- Support: Contact support@customwebtools.com for CSV import assistance
Ready to import? With this guide, you can quickly format your data and upload fuel logs and mileage in seconds instead of entering manually.