The U.S. Department of Energy (DOE) created a new online calculator called the “eGallon” that’s designed to give users a simple way to compare the cost of charging an electric vehicle with the cost of a gallon of gasoline.

On the site, users can view the latest “eGallon” price for their state and compare it to the average price of a gallon of gasoline. The DOE defines the eGallon as the price you pay for enough charge to drive a vehicle the same distance you could drive it on a gallon of gasoline. The price of an eGallon is based on electricity prices in a given state.