{
  "id": 23100512,
  "title": "IFTA fuel tax in Python: fleet MPG, taxable gallons and credits on one return",
  "url": "https://urgent.news/2026/12/02/ifta-fuel-tax-in-python-fleet-mpg-taxable-gallons-and-credits-on-one",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-12-02T10:01:12.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/tidycents/ifta-fuel-tax-in-python-fleet-mpg-taxable-gallons-and-credits-on-one-return-5h6b"
  },
  "original_language": null,
  "account": "The IFTA (International Fuel Tax Agreement) fuel tax system calculates tax liability based on a fleet's miles driven and gallons of fuel purchased. To determine tax, the system takes total miles driven divided by total gallons purchased, rounding the result to two decimal places. This yields the fleet MPG rate.\n\nTaxable gallons per state are calculated by dividing miles driven in that state by the fleet MPG rate, rounded to the nearest whole gallon. The difference between taxable gallons and gallons purchased in a state represents the net amount, which may be a credit if net is negative.\n\nThe tax for each state is calculated by multiplying net gallons by the state's tax rate. Total tax liability is the sum of taxes for each state. Importantly, rounding the fleet MPG first ensures it's used consistently across all state calculations. Some states may add surcharges on taxable gallons, which should be calculated separately.\n\nReal-world IFTA rates fluctuate each quarter, and a detailed state-by-state calculator is available online for free.",
  "summary": "A common shortcut for the quarterly IFTA return is miles in a state times that state's rate. The return works differently: One fleet MPG : total miles everywhere / total gallons bought everywhere, rounded to 2 decimals. Taxable gallons per state come from where you drove: state miles / MPG, rounded to whole gallons. Net gallons = taxable gallons - gallons bought in that state. Negative means…",
  "summary_source": "publisher",
  "key_points": [
    "IFTA calculates tax based on miles driven and gallons purchased",
    "Fleet MPG rate determined by miles divided by gallons, rounded to two decimals",
    "Taxable gallons per state calculated by miles divided by fleet MPG, rounded to whole gallons"
  ],
  "editors_take": null,
  "opinion": false,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "outlets_capped": false,
    "also_reported_by": []
  },
  "machine_translated": false,
  "ai_generated": true,
  "disclaimer": "Accounts, briefs, key points, the editor’s take and translations are written by software from other outlets’ reporting and may contain errors. A summary whose summary_source is \"publisher\" is the outlet’s own feed text. Always check the linked original."
}