Image source: Mark Freeth via Flickr.

Thanks to the big drop in the price of oil over the past couple of years, prices at the pump have dropped significantly. In fact, gas has averaged less than $2 a gallon in the U.S. since dipping below that mark in December. Unfortunately, the days of sub-$2 gas appear to be numbered, with prices at the pump rising over the past month and poised to continue doing so. While we can blame rising crude prices and the traditional spring turnaround season at U.S. refineries for some of the recent rise in gas prices, it's not the main culprit. Instead, gasoline demand has been much stronger than expected, which is the surprising fuel behind the recent surge in pump prices.

Demand is heating up
According to the U.S. Energy Information Administration (EIA), gasoline consumption in the U.S. has averaged 9.4 million barrels per day over the past month. That's 560,000 barrels more than over the same period last year and that level implies that the U.S. could exceed its pre-financial crisis annual average of 9.3 million barrels per day that was set in 2007.

Gasoline demand in general has been on the rise in recent years because of a combination of lower gas prices and rising employment. Last year, for example, gasoline demand rose 2.7%, or by 240,000 barrels per day, to average 9.2 million barrels per day. That demand was fueled by a 2.9% increase in employment and a 3.7% increase in miles' travel, while being offset by higher vehicle fuel economy. Before the unexpectedly strong start to this year, the EIA had forecast a mere 1%, or 90,000 barrel a day, rise in gasoline demand this year driven by a tamer 2.1% increase in highway miles traveled thanks to solid employment growth and lower gas prices, once again being offset by an increase in vehicle fleet fuel economy. However, with demand trending well above those expectations it could lead to a record setting summer driving season in the U.S. While that's not the greatest news for your wallet because it suggests that gas prices will likely continue to rise, it is great news for refining stocks.

A boon to refiners
Thanks to strong gasoline demand and low oil prices, last year was a banner year for U.S. refining companies, which were some of the best performing energy stocks after refiners Valero Energy (NYSE:VLO), Tesoro (NYSE:ANDV), and PBF Logistics (NYSE:PBF) were all up nearly 40% last year:

VLO Chart

VLO data by YCharts

Fueling the strong stock price appreciation were robust refining margins after the companies benefited from the widening spread between what they paid for oil and what they received for selling refined products like gasoline. Valero Energy, for example, saw its throughput margin per barrel jump 17.4%, fueling a 26.1% surge in its adjusted operating income. That provided Valero with a lot of excess cash flow that it choose to return to investors, with the company paying $848 million in dividends and buying back $2.8 billion of its own stock.

Tesoro, likewise, enjoyed a strong year in 2015 reporting record full year earnings of $1.5 billion. Like Valero, it returned the bulk of those earnings to shareholders, with the company sending $872 million of that cash back via share repurchases and dividends. Meanwhile, PBF Energy called 2015 a "transformational year" after it not only benefited from the strong refining environment, but it used its improved financials to acquire two additional refineries to position itself of an even stronger year in 2016 and beyond.

Given the way gasoline demand is trending right now, it would appear that these companies could very well enjoy an even stronger 2016. That's welcomed news for their investors because they'll reap this windfall via even more robust shareholder distributions with Valero, for example, targeting to pay out 75% of its net income this year. In other words, if earnings increase thanks to stronger gasoline demand, that will fuel higher cash returns to shareholders.

Investor takeaway
Gasoline prices are poised to leave the $2-per-gallon level in their dust thanks to much stronger demand for gasoline. While that's bad news for drivers, its great news for refiners because they stand to benefit from stronger refining margins, which has the potential to boost their profitability. That is music to the ears of investors in refining stocks, because these companies plan to return the bulk of that windfall back their way, hopefully more than offsetting any pain they feel at the pump.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.