IFTA Mileage Calculator - CSV Import Guide

Fuel Log CSV Format

Required Columns

Your fuel log CSV must include these columns in this exact order:

ColumnDescriptionFormatExample
`date`Date of fuel purchase`YYYY-MM-DD``2026-01-15`
`jurisdiction`State or province where fuel was purchasedFull name`California`, `Ontario`
`gallons`Amount of fuel purchasedDecimal number`120.5`, `95.2`
`price_per_gallon`Cost per gallon at the pumpDecimal number`3.89`, `4.25`
`total_cost`Total cost of purchaseDecimal 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

  1. Include headers: The first row must contain column names exactly as shown
  2. Date format: Use YYYY-MM-DD (ISO 8601 format)
- Correct: 2026-01-15 - Incorrect: 01/15/2026, 15-Jan-2026, 1/15/26
  1. Jurisdiction names: Use full state/province names exactly as they appear in the tool
- Correct: California, Ontario, British Columbia - Incorrect: CA, Calif, Cali, ON
  1. Numbers: Use decimal notation (no currency symbols, commas, or units)
- Correct: 120.5, 3.89 - Incorrect: 120.5 gal, $3.89, 3,89 (European format)
  1. No blank rows: Remove empty rows from your CSV
  2. 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:

  1. Create a new spreadsheet
  2. Add column headers in row 1:
   date | jurisdiction | gallons | pricepergallon | totalcost
   
  1. Fill in data rows below headers
  2. Save/Export as CSV:
- Excel: File > Save As > CSV (Comma delimited) (.csv) - Google Sheets: File > Download > Comma Separated Values (.csv)

Using a text editor:

  1. Open a plain text editor (Notepad, TextEdit, VS Code)
  2. Type the headers and data rows:
   date,jurisdiction,gallons,pricepergallon,totalcost
   2026-01-15,California,120.5,3.89,468.75
   
  1. Save as .csv file

Exporting from fuel card systems:

Many fuel card providers (e.g., Comdata, WEX, EFS) allow CSV export of transactions. You may need to:

  1. Export transactions for the quarter
  2. Rename columns to match the required format
  3. Convert date format to YYYY-MM-DD
  4. Map location codes to full jurisdiction names

Importing a Fuel Log CSV

  1. Go to the Fuel Logs tab
  2. Click "Import from CSV"
  3. Select the truck you're importing for
  4. Click "Choose File" and select your CSV
  5. 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:

ColumnDescriptionFormatExample
`jurisdiction`State or provinceFull name`California`, `Ontario`
`miles`Miles driven in that jurisdictionDecimal 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

  1. Include headers: The first row must contain column names exactly as shown
  2. Jurisdiction names: Use full state/province names (see list in Fuel Log section)
  3. Numbers: Use whole numbers or decimals (no commas, units, or symbols)
- Correct: 1250, 450.5 - Incorrect: 1,250, 450.5 mi, 1250 miles
  1. Only include jurisdictions you traveled through - No need to list all 58 jurisdictions if you only traveled through 10
  2. No duplicate jurisdictions - Each jurisdiction should appear only once
  3. No blank rows: Remove empty rows

Creating a Mileage CSV

Using Excel or Google Sheets:

  1. Create a new spreadsheet
  2. Add column headers in row 1:
   jurisdiction | miles
   
  1. Fill in data rows (only jurisdictions you traveled through)
  2. Save/Export as CSV

From ELD systems:

Many Electronic Logging Devices (ELDs) can export mileage reports by state. You may need to:

  1. Generate a state-by-state mileage report for the quarter
  2. Export to CSV or Excel
  3. Reformat to match the required columns
  4. Convert state abbreviations to full names (e.g., CACalifornia)

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

  1. Go to the Mileage tab
  2. Click "Import from CSV"
  3. Select the truck you're importing for
  4. Select the quarter (e.g., Q1 2026)
  5. Click "Choose File" and select your CSV
  6. 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:

  1. Save templates in a folder (e.g., "IFTA Templates")
  2. Each quarter, copy the template and fill in new data
  3. This ensures consistent formatting every time

Sample template files:

fuel-log-template.csv:

date,jurisdiction,gallons,pricepergallon,totalcost
2026-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:

  1. Rename columns to match required headers
  2. Format dates:
- Select date column - Format > Number > Custom > YYYY-MM-DD
  1. Format numbers:
- Select number columns - Format > Number > Number (no currency, no thousands separator)
  1. Map jurisdictions:
- If you use abbreviations (CA, TX), use Find & Replace to convert to full names - Create a mapping sheet with abbreviations and full names, then use VLOOKUP
  1. Export as CSV:
- File > Download > CSV (or File > Save 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/2026 or 15-Jan-2026
  • In Excel: Format cells as Custom YYYY-MM-DD before exporting

Error: "Unrecognized jurisdiction"

Cause: Jurisdiction name doesn't match the tool's jurisdiction list

Solution:

  • Check spelling and capitalization (e.g., california should be California)
  • Don't use abbreviations (e.g., CA should be California)
  • 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., gallon instead of gallons)
  • Make sure all required columns are present
  • Column order doesn't matter, but names must match exactly
  • Headers are case-sensitive: date, not Date or DATE

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,89 to 3.89, $120.50 to 120.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 California with 500 and 750 miles → one row with 1250 miles

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

  1. Open your Excel file
  2. Select the worksheet with your data
  3. Rename columns to match required headers
  4. Format dates as YYYY-MM-DD
  5. Format numbers without currency symbols or thousands separators
  6. File > Save As
  7. Choose file type: CSV (Comma delimited) (.csv)
  8. Click Save
  9. If Excel warns about features not supported, click Yes to continue

From Google Sheets to CSV

  1. Open your Google Sheet
  2. Rename columns to match required headers
  3. Format dates as YYYY-MM-DD (Format > Number > Custom > YYYY-MM-DD)
  4. Format numbers as plain numbers (no currency)
  5. File > Download > Comma Separated Values (.csv)
  6. The file downloads to your computer

From QuickBooks to CSV

  1. Export your fuel expense report
  2. Open in Excel or Google Sheets
  3. Map columns:
- Transaction Datedate - Vendor/Locationjurisdiction (you may need to manually add state/province) - Amount → Extract gallons and price from description or memo
  1. Reformat and export as CSV

From Fuel Card Reports

Most fuel card providers (Comdata, WEX, EFS) allow transaction exports:

  1. Log in to your fuel card account
  2. Generate a transaction report for the quarter
  3. Export as CSV or Excel
  4. Open in a spreadsheet program
  5. Map columns to required format:
- Transaction date → date - Location (state) → jurisdiction (convert abbreviations to full names) - Quantity → gallons - Unit price → price
pergallon - Total amount → totalcost
  1. Export as CSV

From ELD Systems

Electronic Logging Devices often provide mileage reports by state:

  1. Log in to your ELD provider's portal
  2. Generate a state mileage report for the quarter
  3. Export as CSV or Excel
  4. Open in a spreadsheet program
  5. Map columns:
- State → jurisdiction (convert abbreviations to full names, e.g., CACalifornia) - Miles → miles
  1. Remove any non-IFTA jurisdictions (Alaska, Hawaii, etc.)
  2. 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.

Was this article helpful?