Overview
A scheduled collector reads twelve daily spot price series from the U.S. Energy Information Administration's open data API twice a day and stores every close since 1986 (the series start at different dates; Henry Hub begins in 1997, ultra-low sulfur diesel in 2006). Requests are served from that store, never from EIA live. The data is public domain; source: U.S. Energy Information Administration, Spot Prices for Crude Oil and Petroleum Products and Natural Gas Spot and Futures Prices.
`price` is the close on `date` and `previousClose` the close on the trading day before it; `change` is the difference and `changePercent` the same as a percent of the previous close. `high52w` and `low52w` are the highest and lowest closes in the 364 days up to `date`. EIA publishes closing assessments a few days after the trading day, so `date` usually trails today by two to five days. These are spot prices, not futures settlements or live quotes.
Crude is published per barrel, refined products and propane per gallon and natural gas per MMBtu. `unit` converts with 42 gallons per barrel, 3.785411784 liters per gallon, 10 therms per MMBtu and 3.412141633 MMBtu per MWh. `history` returns closes from `days - 1` calendar days before `date` through `date`; `weekly` keeps the last close of each Monday-to-Sunday week.
Live Test Energy Prices Source →
Formula
One function covers the whole catalog: the first argument names the source, the next are its inputs, and the field after them says which single value lands in the cell. Formulas covers the grammar that applies to all of them.
=VERVE("energyprices", "count")=VERVE.CALL("energyprices", "count")Inputs
Required inputs are positional, in the order below, followed by the field. Everything else is passed as a "name", value pair after that — 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 |
|---|---|---|---|
benchmarkOptional | string | "benchmark", value | Benchmark to price, or a comma-separated list (paid plans), or all. Defaults to wti.wtibrenthenryhubgasoline_nyhgasoline_gulfrbob_laulsd_nyhulsd_gulf+5 |
unitOptional | string | "unit", value | Unit to price per: barrel, gallon or liter for crude and refined products; mmbtu, therm or mwh for natural gas. Defaults to each benchmark's published unit.barrelgallonlitermmbtuthermmwh |
dateOptionalPremium | string | "date", value | Date to look up (YYYY-MM-DD). Returns the close on that day, or the latest trading day before it. Omit for the latest close. date |
historyOptionalPremium | string | "history", value | Include a price series ending at the returned date: daily closes or the last close of each week.dailyweekly |
daysOptionalPremium | integer | "days", value | Calendar days of history to include (1-3650). Daily history allows up to 366. Defaults to 30. range 1–3650 |
Passing an option
=VERVE("energyprices", "count", "benchmark", "wti")=VERVE.CALL("energyprices", "count", "benchmark", "wti")What lands in your sheet
The field — the argument after the inputs — 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
Leave the field out 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("energyprices")=VERVE.CALL("energyprices")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 argument 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 the field | Type | Example cell value | Description |
|---|---|---|---|
count | number | 1 | Number of benchmarks returned |
date | string | 2026-11-11 | The requested date, or the most recent close across the returned benchmarks (YYYY-MM-DD) |
prices | array[1] | One entry per benchmark | |
prices.0.benchmark | string | wti | Benchmark id, e.g. wti or henryhub |
prices.0.name | string | WTI Crude Oil | Benchmark name |
prices.0.product | string | crude oil | Commodity: crude oil, natural gas, gasoline, diesel, heating oil, propane or jet fuel |
prices.0.location | string | Cushing, OK | Delivery point the spot price is assessed at |
prices.0.currency | string | USD | Currency of every price in the entry (USD) |
prices.0.unit | string | barrel | Unit the prices are quoted per |
prices.0.nativeUnit | string | barrel | Unit EIA publishes the benchmark in |
prices.0.price | number | 89.62 | Closing spot price on date |
prices.0.date | string | 2026-11-11 | Trading day of the close (YYYY-MM-DD) |
prices.0.previousClose | number | 89.62 | Close on the previous trading day |
prices.0.previousDate | string | 2026-11-10 | Trading day of the previous close |
prices.0.change | number | 0 | Change from the previous close, in currency per unit |
prices.0.changePercent | number | 0 | Change from the previous close, in percent |
prices.0.changeDirection | string | unchanged | up, down or unchanged |
prices.0.high52wPremium | number | 114.58 | Highest close in the 52 weeks to date |
prices.0.high52wDatePremium | string | 2026-04-07 | Trading day of the 52-week high |
prices.0.low52wPremium | number | 55.44 | Lowest close in the 52 weeks to date |
prices.0.low52wDatePremium | string | 2025-12-16 | Trading day of the 52-week low |
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 energyprices | 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
- Fuel Surcharge Calculators
- Freight and airline tools tie surcharges to the daily diesel or jet fuel spot close and its weekly average, recalculated automatically as the benchmark moves.
- Energy Cost Dashboards
- Finance teams chart WTI, Brent and Henry Hub side by side in one call, with daily change and 52-week range for context.
- Utility and Heating Estimates
- Home energy apps convert Henry Hub gas to therms and heating oil to gallons to estimate the wholesale cost behind a household bill.
- Backtests and Research
- Analysts pull years of weekly closes for crude and products to study crack spreads, seasonality and price shocks.
Other ways to use Energy Prices
Set up Energy 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: