Oil's up, gas is down. Why?

NEW YORK (CNNMoney) -- Those anxiously watching the rally in U.S. oil prices over the past few weeks have received a pleasant surprise at the pump: while oil has shot upward, gasoline is moving in the opposite direction.

The moves may seem counter-intuitive, since crude oil is used to produce gas. But while the two are closely related, there are a number of factors that can push their prices apart in the short term.

Retail gasoline is more expensive than crude oil because of additional costs such as taxes, distribution and the refining process.

Historically, oil and gas "have always moved in tandem," with gas prices following on oil moves within three to six months, said Patrick Vahid, a senior trader at Sonic Futures. They do face different supply-and-demand forces, however, and are sometimes pulled in opposite directions.

For one thing, gasoline isn't the only product for which crude oil is used.

The U.S. Energy Information Administration says for every barrel of crude oil produced in America in 2010, just 42% went to gasoline.

The rest was divided among other products including diesel, jet fuel and consumer goods such as tires and ink. Demand for these products also goes some way to shaping oil prices. Diesel, in demand as a generator of electricity in the developing world, has become more expensive in recent months.

The U.S. benchmark -- West Texas Intermediate, or WTI -- has been surging on the draining of a supply glut at the main U.S. oil trading hub in Oklahoma that had previously held down the price.

WTI, though, is just one variety of oil and is used primarily in the Midwest. Refineries on the East Coast are more likely to use international varieties of oil whose prices are indexed to Brent, the European benchmark, according to Stephen Shorck, publisher of the industry newsletter The Schork Report.

Brent has already been up above $100 a barrel for months and has held fairly steady while WTI has risen.

The drop in retail gas prices, Shorck added, is partly seasonal, as refiners swtich to winter-grade gasoline that is cheaper to produce. Gas consumption also drops as the weather gets colder -- fewer on-a-whim road trips -- and that pushes down the price.

Looking ahead, the Energy Information Administration said in October that U.S. gas prices would average $3.52 per gallon this year before dropping to $3.43 in 2012 amid continued sluggishness in the economy. With the recent rally in U.S. oil prices, however, Shorck said price rises at the pump could come in just a few weeks.