U.S. Weekly Retail Fuel Prices: Seasonality and the Diesel Premium

Author

Team Trusting Kiwi
Amanda Johnson, Maria Persaud Fernandez, Simah Sahnosh

── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.6
✔ forcats   1.0.1     ✔ stringr   1.6.0
✔ ggplot2   4.0.1     ✔ tibble    3.3.0
✔ lubridate 1.9.4     ✔ tidyr     1.3.2
✔ purrr     1.1.0     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors

Attaching package: 'scales'


The following object is masked from 'package:purrr':

    discard


The following object is masked from 'package:readr':

    col_factor
Rows: 22360 Columns: 5
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr  (3): fuel, grade, formulation
dbl  (1): price
date (1): date

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

Introduction

The dataset we analyze comes from the U.S. Energy Information Administration (EIA) and reports weekly national average retail fuel prices in the United States. Prices are collected every Monday from a large sample of gasoline stations and diesel outlets across the country and represent the average cash pump price paid by consumers, including all taxes. The data include both gasoline and diesel prices (USD per gallon) and, for gasoline, breakouts by grade (regular, midgrade, premium, and all grades) and formulation (conventional vs. reformulated). Each row corresponds to a specific fuel configuration in a given week.

The dataset contains 22360 observations spanning 1813 weeks from 1990-08-20 to 2025-06-23. This weekly frequency and multi-decade span make the data well suited for examining both seasonal patterns and longer-run shifts in fuel markets, while still capturing short-term shocks. In this analysis, we focus on (1) whether seasonality differs meaningfully across fuel type, gasoline grade, and gasoline formulation, and (2) how the diesel premium (diesel minus all-grades gasoline) evolves over time, particularly during periods of higher versus lower price volatility.

So What? The results of this analysis are crucial for understanding the dynamics of fuel prices across different fuel types, grades, and formulations over time. Insights into seasonality patterns can help stakeholders in the fuel industry (policymakers, fuel suppliers, and consumers) for price fluctuations tied to seasonal demand changes. Additionally, analyzing the diesel premium’s evolution during periods of volatility can reveal critical information for industries reliant on diesel fuel, such as transportation and logistics. Understanding these trends is vital for making informed decisions on pricing, economic forecasting, and managing supply chain costs, ultimately influencing both policy and business strategies in the energy sector.

Question 1 <- How Do Weekly U.S. Retail Fuel Prices Vary by Season Across Fuel Type and Gasoline Grade?

Introduction

Seasonal patterns in fuel prices are a well‑documented feature of U.S. energy markets. Gasoline demand typically rises during the summer driving season, while winter blends and regulatory requirements can influence prices at other times of year. Diesel prices, by contrast, are shaped more by freight activity, heating demand, and refinery constraints due to their different usages. Understanding whether these two fuels follow the same or different seasonal cycles matters because businesses and consumers who rely on each fuel face different cost pressures at different times of year. In this section, we examine how seasonal price patterns differ across two key dimensions: fuel type (gasoline vs. diesel) and gasoline grade (regular, midgrade, premium).

To do this, we use the weekly national average retail fuel price dataset from the U.S. Energy Information Administration. From the date variable, we create year, month, and a four‑category season variable (Winter, Spring, Summer, Fall). These derived variables allow us to compare how average prices vary across seasons and whether gasoline grades exhibit distinct seasonal behavior relative to each other and to diesel.

Approach

To examine seasonal differences across fuel types, we focus on weekly national average prices where each fuel has a single comparable observation per week. Because gasoline and diesel are structured differently in the dataset, gasoline observations are restricted to rows where grade == “all” and formulation == “all”, while diesel observations use rows where grade == “all”. We then compute mean prices within each season for gasoline and diesel separately. A line plot is used to emphasize directional seasonal change and allow direct comparison of how strongly each fuel responds to seasonal demand cycles.

To compare seasonal behavior across gasoline grades, we isolate gasoline observations where formulation == “all” and exclude aggregate “all” grade rows to avoid duplication. We visualize seasonal price distributions using boxplots, which highlight median prices, variability, and consistency across grades. Together, these visualizations allow us to distinguish between differences in seasonal magnitude across fuel types and stability of price hierarchy across gasoline grades, linking both figures into a single analytical narrative about seasonal fuel price dynamics.

Analysis

seasonal_data <- weekly_gas_prices |>
  mutate(
    month = month(date),
    season = case_when(
      month %in% c(12, 1, 2) ~ "Winter",
      month %in% c(3, 4, 5) ~ "Spring",
      month %in% c(6, 7, 8) ~ "Summer",
      TRUE ~ "Fall"
    ),
    # Order the seasons chronologically for easier plotting
    season = factor(season, levels = c("Winter", "Spring", "Summer", "Fall"))
  )
fuel_seasonal_avg <- seasonal_data |>
  filter(
    (fuel == "gasoline" & grade == "all" & formulation == "all") |
      (fuel == "diesel" & grade == "all")
  ) |>
  group_by(season, fuel) |>
  summarize(mean_price = mean(price, na.rm = TRUE), .groups = "drop")

# connecting points across seasons makes the trajectory easier to follow
# than a bar chart.
ggplot(
  fuel_seasonal_avg,
  aes(x = season, y = mean_price, group = fuel, color = fuel)
) +
  geom_line(linewidth = 1.4) +
  geom_point(size = 3) +
  geom_text(
    data = fuel_seasonal_avg |> filter(season == "Summer"),
    aes(label = "Summer peak"),
    vjust = -1,
    show.legend = FALSE
  ) +
  scale_y_continuous(
    labels = dollar_format(),
    expand = expansion(mult = c(0.05, 0.15))
  ) +
  labs(
    title = stringr::str_wrap(
      "Gasoline Prices Exhibit Stronger Summer Seasonality Than Diesel",
      width = 55
    ),
    subtitle = "Weekly U.S. retail fuel prices averaged by season",
    x = "Season",
    y = "Average Price (USD per gallon)",
    color = "Fuel Type",
    caption = "Gasoline prices rise sharply during the summer driving season,
      while diesel prices change more gradually across the year."
  ) +
  theme_custom(base_size = 13)

gasoline_grade_data <- seasonal_data |>
  filter(
    fuel == "gasoline",
    formulation == "all",
    grade %in% c("regular", "midgrade", "premium")
  ) |>
  mutate(
    grade = factor(
      grade,
      levels = c("regular", "midgrade", "premium")
    )
  )

ggplot(
  gasoline_grade_data,
  aes(x = season, y = price, fill = grade)
) +
  geom_boxplot(alpha = 0.85) +
  stat_summary(
    fun = median,
    geom = "point",
    shape = 18,
    size = 3,
    color = "black"
  ) +
  # Dollar formatting improves readability, adding title and cross-chart interpretation
  scale_y_continuous(labels = dollar_format()) +
  labs(
    title = stringr::str_wrap(
      "Seasonal Changes Affect All Grades While Price Hierarchy Remains Stable",
      width = 55
    ),
    subtitle = "Distribution of weekly gasoline prices by season and grade",
    x = "Season",
    y = "Price (USD per gallon)",
    fill = "Gasoline Grade",
    caption = stringr::str_wrap(
      "Although prices increase in summer across all grades, premium gasoline consistently remains the most expensive.",
      width = 80
    )
  ) +
  theme_custom(base_size = 13)

Discussion

Together, the visualizations reveal that seasonal forces influence fuel markets differently depending on fuel type but consistently across gasoline grades. Gasoline prices display pronounced seasonality, rising sharply from winter to summer before declining in fall. This pattern reflects increased consumer travel demand and the higher production costs associated with environmentally regulated summer fuel blends. Diesel prices, although consistently higher overall, change more gradually across seasons and reach their highest levels later in the year, likely reflecting freight demand and heating-related fuel consumption rather than consumer travel behavior.

Across gasoline grades, seasonal movements occur simultaneously, but the relative ordering of prices remains unchanged. Premium gasoline remains consistently more expensive than midgrade and regular gasoline in every season, indicating that grade-based price differences are structurally maintained rather than driven by seasonal shocks. While seasonal demand raises prices across all grades, it primarily affects overall price levels rather than relative differences between fuel types.

Taken together, these findings suggest that seasonality primarily alters the magnitude of fuel prices rather than their relative structure. Gasoline markets appear more sensitive to seasonal consumer demand cycles, whereas diesel pricing reflects steadier commercial demand. This distinction highlights how different economic uses of fuels shape their exposure to seasonal market pressures.

Presentation

Our presentation can be found here.

Data

U.S. Energy Information Administration (EIA). (1990–present). Weekly US Gas Prices [Data set]. U.S. Department of Energy. Retrieved February 10, 2026, from https://www.eia.gov/dnav/pet/pet_pri_gnd_dcus_nus_w.htm. Data curated for TidyTuesday by Jon Harmon.

References

U.S. Energy Information Administration. (n.d.). Gasoline and diesel fuel update. U.S. Department of Energy. https://www.eia.gov/petroleum/gasdiesel/

R Core Team. (2023). stats::lag — Lag a time series. R Documentation. https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/lag

Davis, D. (2021). slider: Sliding window functions. R Documentation. https://www.rdocumentation.org/packages/slider/versions/0.3.3

R Core Team. (2023). stats::quantile — Sample quantiles. R Documentation. https://www.rdocumentation.org/packages/stats/versions/3.6.2/topics/quantile

Wickham, H. (2022). scales: Scale functions for visualization. R Documentation. https://rdrr.io/cran/scales/man/scales-package.html

user3680613. (2022). Change slide background using CSS with Quarto Reveal.js [Stack Overflow post]. Stack Overflow. https://stackoverflow.com/questions/74401855/change-slide-background-using-css-with-quarto-reveal-js