Just in time for summer—gas prices are expected to hit a national average of $4 per gallon by May.

Patrick DeHaan, senior petroleum analyst at GasBuddy.com, is forecasting prices will peak in May -- by Memorial Day weekend at the latest. According to GasBuddy.com, the current national average is $3.44 per gallon -- up from January's average of $3.34 per gallon. The national average could climb as high as $4.15 per gallon, he said, and perhaps even higher depending on geopolitical issues.

"That price [$4.15 per gallon] is discounting the possibility of military action against Iran," DeHaan said. "If there is action with Iran, prices can spike much higher—.25 cents to .75 cents higher per gallon. Even if it's not the U.S. going to war with Iran, it could be Israel attacking them."

DeHaan said the trend will be higher prices in major cities heading into summer months. For example, prices could range from $4.25 to $4.50 per gallon in New York City and $4.50 to $4.75 per gallon in San Francisco, he said.

"Typically gas prices rise in April and May as the U.S. switches over to cleaner burning summer gasoline under the EPA Clean Air Act," DeHaan said. "Every community will be burning a different gasoline, and the biggest cities burn the cleanest gasoline, which is why prices go up."

For those looking to save money, there are a couple options, he said. Using the Web to research price averages is one place to start.

"People can always shop around," DeHaan said. "We use the Internet to research things like technology purchases, but people don't realize they can do that for gas."

Another option for those looking to stretch their dollars spent on gas is driving defensively. Those who do so can boost their miles per gallon by up to 25%, DeHaan said, adding he has tested this himself.

"If you accelerate at a slower rate, you can boost your miles per gallon," he said. "America is in such a hurry, it's probably not going to happen. This is more of a lifestyle habit and is harder for people do than it is to shop around."

Follow Kate Rogers on Twitter at @KateRogersNews