A record number of Americans plan to travel over the Independence Day holiday weekend. With a little advance planning, it can be a cheap road trip. An estimated 44.2 million Americans will travel 50 miles or more from home between Friday, June 30 and Tuesday, July 4, according to AAA. Most — 37.5 million — will be driving. Their first stop: a gas station. The Friday of Independence Day weekend is the biggest day for buying gas, with spending up 27 percent compared to the daily average in July, according to Bank of America. Average spending per fill up in 2016 was $28. (The bank looked at aggregated data from more than 40 million credit and debit card users over the 2016 holiday.)

Fuel prices have been declining over the past month due to seasonal trends and the falling price of crude, said Patrick DeHaan, a senior petroleum analyst for GasBuddy.com. Nationwide, the average price for a gallon of gas is $2.28, and drivers are likely to see gas prices decline further as the holiday approaches.

We definitely think the road will be crowded. Tamra Johnson AAA spokeswoman

"It's going to be a terrific July 4 — which is typically the busiest driving holiday," he said. If you're planning to hit the road over the holiday weekend, here's how to maximize savings:

1) Avoid idling in traffic

The more time you spend idling in traffic, the more fuel you'll waste, Tamra Johnson, a spokeswoman for AAA, told CNBC earlier this summer. Of course, avoiding traffic on a holiday weekend is easier said than done. "We definitely think the road will be crowded," she said. If you can, leave early (or late) to avoid peak traffic hours. On the road, use navigation tools and apps like Waze that can spot problems ahead and help you find alternate routes.

2) Watch out for state lines

Prices tend to be higher at stations near highways, but you can still save even if you're not willing to detour into a nearby town. Apps such as GasBuddy and AAA Mobile can help you find the best gas prices along your route. "State lines are something to be very aware of," said DeHaan. Gas taxes can vary substantially, and it might be better to top off the tank than wait until later in your trip. In Pennsylvania, for example, the federal and state gas taxes add up to 77.7 cents per gallon, while in Ohio they total 46.41 cents. The difference is maybe $5 per fill-up for someone driving a small car, and $35 or more for an RV, he said.

3) Fuel up your wallet