While most of the price fluctuations at the gas pump are tied to the price of crude oil, other factors, including supply and demand changes, commodity speculation, regulatory changes and weather, also play a role. However, these effects are not always immediate, and may take months to affect gas prices.
Some gas price fluctuations are easy to predict, such as those that occur seasonally. Drivers tend to travel more in the summer, increasing demand at a time when most gas stations are switching from winter blend gasoline to a mixture designed to reduce emissions and smog. This increased demand, coupled with the reduced amount of summer blend gas available from refiners, tends to drive gas prices up at this time of year. Likewise, diesel fuel prices tend to increase in winter, because diesel and heating oil are made from the same raw materials and demand for these materials increases.
Weather can also play a major role in the price of gas. Even when oil prices are low, gas prices can remain high if there's not enough refinery capacity available to convert the excess oil into gasoline. For example, when a hurricane strikes the Gulf Coast, it can put refineries out of production for days, leading to supply deficiencies that can spike prices.