Overview
Gas Prices is built on three official weekly surveys: the U.S. Energy Information Administration retail gasoline and diesel survey (since 1990, including nine states and ten metro areas), the European Commission Weekly Oil Bulletin for every EU member (since 2005) and the UK government weekly road fuel prices (since 2003). Each price is stored as published, in the currency drivers pay, and can be converted to any currency and to liters or gallons on request. Use it for fuel cost calculators, fleet budgeting, delivery surcharges and cross-country cost comparisons.
Formula
One function covers the whole catalog: the first argument names the source, the rest are its inputs, and the "field" pair says which single value lands in the cell. Formulas covers the grammar that applies to all of them.
=VERVE("gasprices", "field", "countryName")=VERVE.CALL("gasprices", "field", "countryName")Inputs
Required inputs are positional, in the order below. Everything else is passed as a "name", value pair after them — the same shape as SUMIFS. Premium inputs are accepted on every plan but only take effect on plans that include them.
| Input | Type | Where it goes | Description |
|---|---|---|---|
countryOptional | string | "country", value | Country to get prices for: US, GB, EU (the EU average) or any EU member code such as DE, FR or PL. Defaults to US. Countries other than US require a paid plan.USGBEUATBEBGCYCZ+22 |
areaOptional | string | "area", value | US only: a state code (CA, CO, FL, MA, MN, NY, OH, TX, WA), a region (eastcoast, midwest, gulfcoast, rockymountain, westcoast and the PADD 1 sub-regions) or a city (losangeles, chicago, houston, newyorkcity and more). Omit for the national average. Requires a paid plan.USeastcoastnewenglandcentralatlanticloweratlanticmidwestgulfcoastrockymountain+21 |
currencyOptionalPremium | string | "currency", value | Currency to return prices in, as an ISO code (e.g. USD, EUR, GBP). Defaults to the country's own currency. length 3–3 |
unitOptional | string | "unit", value | Volume unit to price per: liter or gallon. Defaults to the source's unit (gallon for the US, liter elsewhere).litergallon |
dateOptionalPremium | string | "date", value | Date to look up (YYYY-MM-DD). Returns the survey week in effect on that date. Omit for the latest week. date |
Passing an option
=VERVE("gasprices", "country", "US")=VERVE.CALL("gasprices", "country", "US")What lands in your sheet
The "field" pair is what makes the formula resolve to one cell. Its value is a dot-path from the table below, so swapping it is how you pull a different value — one formula per column.
Seeing everything at once
Drop the "field" pair and the formula returns the whole response instead: two columns, field name on the left and value on the right, spilling from the cell you typed in.
=VERVE("gasprices")=VERVE.CALL("gasprices")The second row's table would land on top of the first's, and every cell after the first reads #REF! (#SPILL! in Excel). Keep one per sheet, or name a field, and leave the cells below and to the right empty.
Response fields
Paths are relative to data. Each one is exactly what the "field" pair accepts, so swapping it is how you pull a different value into a cell. On a plan without a Premium field the cell reads #PREMIUM(field) rather than a value, so a locked field never looks like a real answer.
| Use as "field" | Type | Example cell value | Description |
|---|---|---|---|
country | string | US | ISO country code the prices apply to (EU for the European Union average) |
countryName | string | United States | Country name |
area | string | US | Area code the prices apply to: the country code for national prices, or a US state code, region or city key |
areaName | string | United States | Human-readable area name |
areaType | string | national | Area granularity: national, union, region, state or city |
week | string | 2026-09-28 | Survey week (Monday) in YYYY-MM-DD format |
currency | string | USD | ISO currency code of all prices and changes in this response |
unit | string | gallon | Volume unit prices are quoted per: gallon or liter |
prices | object | {…} | Average retail price per unit by fuel grade |
prices.regular | number | 4.465 | Average retail price of regular unleaded per unit; null where the source does not survey it for this area |
prices.midgradePremium | number | 5.073 | Average retail price of midgrade per unit; null where the source does not survey it for this area |
prices.premiumPremium | number | 5.482 | Average retail price of premium per unit; null where the source does not survey it for this area |
prices.dieselPremium | number | 6.382 | Average retail price of No. 2 diesel per unit; null where the source does not survey it for this area |
prices.allGradesPremium | number | 4.603 | Average retail price of all gasoline grades combined per unit; null where the source does not survey it for this area |
prices.lpgPremium | object | null | Average retail price of LPG (autogas) per unit; null where the source does not survey it for this area |
changeDirection | string | down | Direction of the weekly change in regular gasoline: up, down or unchanged |
previousWeekPremium | string | 2026-09-21 | Date of the prior survey week used for the weekly change |
weeklyChange | object | {…} | Change in price per unit from the previous survey week, by grade |
weeklyChange.regularPremium | number | -0.013 | Week-over-week change in the regular unleaded price, in currency per unit |
weeklyChange.midgradePremium | number | 0.012 | Week-over-week change in the midgrade price, in currency per unit |
weeklyChange.premiumPremium | number | 0.022 | Week-over-week change in the premium price, in currency per unit |
weeklyChange.dieselPremium | number | -0.147 | Week-over-week change in the No. 2 diesel price, in currency per unit |
weeklyChange.allGradesPremium | number | -0.007 | Week-over-week change in the all gasoline grades combined price, in currency per unit |
weeklyChange.lpgPremium | object | null | Week-over-week change in the LPG (autogas) price, in currency per unit |
yearAgoWeekPremium | string | 2025-09-29 | Date of the survey week one year earlier used for the yearly change |
yearlyChange | object | {…} | Change in price per unit from the same week a year earlier, by grade |
yearlyChange.regularPremium | number | 1.347 | Year-over-year change in the regular unleaded price, in currency per unit |
yearlyChange.midgradePremium | number | 1.366 | Year-over-year change in the midgrade price, in currency per unit |
yearlyChange.premiumPremium | number | 1.415 | Year-over-year change in the premium price, in currency per unit |
yearlyChange.dieselPremium | number | 2.628 | Year-over-year change in the No. 2 diesel price, in currency per unit |
yearlyChange.allGradesPremium | number | 1.355 | Year-over-year change in the all gasoline grades combined price, in currency per unit |
yearlyChange.lpgPremium | object | null | Year-over-year change in the LPG (autogas) price, in currency per unit |
nativeCurrency | string | USD | Currency the source publishes in (USD for the US, GBP for the UK, EUR or the local currency in the EU) |
nativeUnit | string | gallon | Unit the source publishes in (gallon for the US, liter elsewhere) |
exchangeRate | number | 1 | Rate applied to convert from nativeCurrency to currency; 1 when no conversion was requested |
When a cell doesn't fill
A failed lookup returns readable text starting with #ERR rather than a spreadsheet error, because Excel cannot show a custom message on a real error — you would get a bare #VALUE! with no reason. The trade-off is that IFERROR() will not catch it; test with LEFT(cell, 4) = "#ERR" instead. Error handling covers the rest.
| Cell reads | What happened |
|---|---|
#ERR Not connected | No API key saved. Open the side panel and connect your account. |
#ERR Replace <name> with a cell or value | A preview formula was copied as-is. Swap the placeholder for a cell reference. |
#ERR No "x" in gasprices | An option name this source does not take. The message lists the ones it does. |
#ERR No data point "…" | The "field" path is not in the response. Check it against the table above. |
#PREMIUM(field) | The field exists but your plan does not include it. |
#ERR Out of credits | The cycle's credits are spent. Usage resets on your billing date. |
Before the formula works
The add-in reads the API key you saved once in the side panel — the key never goes in the formula, so a shared sheet does not leak it and a collaborator without access simply sees the last calculated values.
- Install the add-in for Google Sheets or Excel.
- Open the side panel and sign in, or paste a key from your dashboard.
- Type the formula above into any cell.
Use cases
- Trip Fuel Cost Calculators
- Estimate the fuel cost of a road trip by multiplying route distance and vehicle efficiency by the current price for the country, state or city being driven through.
- Fleet Fuel Budgeting
- Logistics teams forecast monthly fuel spend by tracking weekly diesel prices and the year-over-year change in every country their trucks operate in.
- Delivery Fuel Surcharges
- Couriers and freight brokers tie fuel surcharges to the weekly national diesel average so pricing adjusts automatically as pump prices move.
- Cross-Country Cost Comparisons
- Travel and relocation sites compare what drivers pay across Europe and the US by requesting every country in one currency and per liter.
Other ways to use Gas Prices
Set up Gas Prices on VerveSheets, or reach the same source a different way. Your VerveSheets account and credits work on all of them — one key, one balance.
Related
More in Finance: