← All datasets

Gas Prices

US gas prices every week since August 1990 in one free CSV download: 1,885 weekly rows from the Energy Information Administration (public domain), merging the national retail averages for regular gasoline, premium, and on-highway diesel in dollars per gallon. Rows carry the week, all three prices (diesel honestly NA before its 1994 series start), the premium-over-regular spread (always positive by test), week-over-week and year-over-year change on regular, and an All_Time_High flag that lights up as the running record breaks, ending at the $5.006 week of June 2022, never re-broken since by test. The sub-dollar gas of the late-90s oil glut is all pre-2000 by test. The Year column joins the Inflation CPI topic, where the real-dollar story (1998 gas was historically cheap, 2008 rivaled 2022) is waiting. Open to analysis of price shocks (Katrina, 2008, COVID, 2022), seasonality, the premium spread's slow widening, and diesel-gasoline divergence. Nine acceptance tests, one enforcing the 25 percent fill rule on every column.
1,885 rows 1 file last pulled 2026-11-13
Where would you start?
Pick a question, or ask your own and answer it; publish what you find as an insight. The same question can carry many insights from different angles.
  • Which price shocks hit fastest, and how long did recovery take?
  • How do real gas prices today compare to the 1970s peaks?
  • Which decades had the most stable prices?
Gas Prices Weekly 1,885 rows × 10 columns
WeekYearRegular_USD_GalPremium_USD_GalDiesel_USD_GalPremium_SpreadWoW_PctYoY_PctAll_Time_HighAs_Of

Questions and answers

What is the Gas Prices dataset?

US gas prices every week since August 1990 in one free CSV download: 1,885 weekly rows from the Energy Information Administration (public domain), merging the national retail averages for regular gasoline, premium, and on-highway diesel in dollars per gallon. Rows carry the week, all three prices (diesel honestly NA before its 1994 series start), the premium-over-regular spread (always positive by test), week-over-week and year-over-year change on regular, and an All_Time_High flag that lights up as the running record breaks, ending at the $5.006 week of June 2022, never re-broken since by test. The sub-dollar gas of the late-90s oil glut is all pre-2000 by test. The Year column joins the Inflation CPI topic, where the real-dollar story (1998 gas was historically cheap, 2008 rivaled 2022) is waiting. Open to analysis of price shocks (Katrina, 2008, COVID, 2022), seasonality, the premium spread's slow widening, and diesel-gasoline divergence. Nine acceptance tests, one enforcing the 25 percent fill rule on every column.

How big is the Gas Prices dataset?

1,885 rows in one CSV file, with 10 columns in total: Week, Year, Regular_USD_Gal, Premium_USD_Gal, Diesel_USD_Gal, Premium_Spread, WoW_Pct, YoY_Pct, All_Time_High, As_Of.

Where does the data come from?

It is built by programmatically scraping eia.gov, last pulled on 2026-11-13. Datasets are versioned; older versions stay downloadable.

Is the dataset free to download?

Yes. Every CodeSights dataset is completely free as a CSV download; a free account is all it takes. Anyone can preview the data without signing in.

Can I see the code that built this dataset?

Yes. The exact Python scraper that built it is viewable on the dataset page by any signed-in member, so every number is reproducible.

Can the data contain errors?

Automated scraping leaves room for error and the underlying sources change over time, so no version is guaranteed accurate or complete. If a number matters, verify it against the original source.

Browse every free dataset on CodeSights