How we calculate
MilePrice works out what a car costs to fuel or charge, using public U.S. government data refreshed every week.
The formula
Gas car: miles ÷ mpg × price per gallon
Electric car: miles × kWh per 100 miles ÷ 100 × price per kWh
Every figure on the site is those two lines of arithmetic. Headline figures assume 1,000 miles a month; every calculator lets you change the miles, the version and the price.
Fuel economy
Ratings are the U.S. Environmental Protection Agency's combined city and highway figures from fueleconomy.gov, for the 2026 model year where one exists and the newest earlier year otherwise. We cover 20 of the best-selling cars, trucks and EVs, with every version EPA rates. Where a page quotes a single figure, it uses the version in the middle of that car's range, so it neither flatters nor punishes the car.
For electric cars, EPA measures electricity from the wall outlet, so energy lost while charging is already included. Cars EPA rates on premium or diesel are priced at that fuel.
Gas prices
From the U.S. Energy Information Administration's weekly retail survey, currently the week of November 9, 2026. EIA publishes nine states on their own. Every other state takes its region's weekly average, adjusted for how its fuel tax differs from the average of the states in that region, using EIA's table of state fuel taxes (July 2026 (revised)). Those states are marked as estimates wherever a price appears. Alaska and Hawaii use the plain West Coast average, which usually understates them.
Each state page also charts the past year of weekly prices and says how far they have moved in four weeks and in a year. Where EIA surveys the state, that is the state's own series. Where it doesn't, it is the regional average the estimate is built on, labelled as such: the estimate adds a fixed tax difference to that average, so it moves with it cent for cent.
Electricity prices
EIA's average residential electricity price for each state, averaged over the 12 months from September 2025 to August 2026, so a yearly figure is not skewed by one summer month. Charging on a time-of-use plan or at public fast chargers will cost a different amount; enter your own rate in the calculator.
EV pages chart each state's monthly rate over the last two years and compare the 12-month average the page uses with the 12 months before it, which shows both the year-on-year change and how much rates swing between seasons.
Full charges and trips
The cost of a full charge is the electricity drawn from the wall to drive an electric car's whole EPA range: range × kWh per 100 miles, at the state's average home rate. Because EPA measures at the outlet, that includes charging losses, so it runs about 10–15% above the battery's own capacity. It is our estimate from EPA figures, not a number EPA publishes.
The trip calculator uses the same formula for a single drive: the distance, doubled for a round trip, divided by mpg (or times kWh per mile), at the price where you fill up, split between however many people share the car. For a car we don't cover, type its mpg.
Fuel taxes and fees for EVs and hybrids
Each state page shows how much of a gallon is tax: the state's total from EIA's table (July 2026 (revised)) plus the federal tax of 18.4¢ a gallon on gas and 24.4¢ on diesel. The yearly tax a car pays is its gallons for the year times that tax, from EPA mpg and EIA rates alone, so it is not an estimate even where the pump price is. County and city fuel taxes are not included; the page says where a state allows them.
Most states charge electric cars an extra yearly registration fee in place of the gas tax they never pay, and about a dozen charge hybrids a smaller one. We check each state's amounts by hand against its own government page or law, or the U.S. Department of Energy's Alternative Fuels Data Center, and link the source on every state page. The table was last checked October 3, 2026; states mostly change their fees on January 1 and July 1, and we re-check after each. Where a fee depends on weight or price, the page gives the amount for a passenger car and says heavier or pricier ones pay more. Hybrid fees are shown for full hybrids only: whether a state charges a 48-volt mild hybrid, like Ram's eTorque trucks, depends on how it registers the vehicle, so those pages don't say.
Virginia charges any car rated 25 mpg or more a highway use fee: 85% of the gas tax it saves against a 23.7 mpg car over the same miles. Electric cars pay the same formula with no gas at all, so we work out a car's fee from Virginia's published EV amount, scaled by its EPA rating, and the page says it is our calculation.
Fees are shown beside the fuel and charging costs, not added to them, so the monthly figures stay the cost of gas or electricity. The gas-versus-EV comparison on each state page says what the fees do to the saving.
What the figures leave out
Insurance, maintenance, depreciation, tolls, parking, ordinary registration fees and local fuel taxes. Real-world economy also varies with speed, weather, load and tires. These are planning estimates, not quotes.
Sources
- EPA fuel economy data
- EIA gasoline and diesel fuel update
- EIA electricity data browser
- EIA federal and state motor fuel taxes
- Alternative Fuels Data Center state laws (U.S. Department of Energy), with each state's own source linked on its pages
Found a figure that looks wrong? Email [email protected] with the page's address, and we'll check it against these sources.