This article is reprinted by permission from NerdWallet

With the cost of everything rising faster and faster, it can be hard to build a reliable travel budget. Will gas prices rise or fall by the summer? And will airfare costs keep pace?

The question of whether it’s cheaper to fly or drive is an old travel conundrum, but the many factors affecting travel in 2022 make it a challenging one to answer simply.

Three things stand out:

  • Airfare should be less affected by high fuel prices than gas-powered road trips.
  • Driving could still be best over short distances or with a large group.
  • Keep the high cost of renting a car (to drive to your destination or when you arrive after a flight) in mind.

Of course, many factors beyond cost affect the decision to fly or drive. But given the rising costs of travel and its impact on planning and budgeting, we’ll focus on the finances.

The effect of fuel costs

Rising oil prices have driven up the cost of fuel and, in turn, the cost of both driving and flying. But the way oil prices affect these costs varies.

Increased gasoline prices instantly and directly affect the cost of driving. A road trip that burns 100 gallons of gas will cost $100 more if a gallon of gas increases by a buck.

The impact is not so clear for airfare. Some experts estimate that jet fuel accounts for about 30% of airlines’ operating expenses, according to the most recent Consumer Airfare Index Report from travel booking platform Hopper. And increases in airfare usually lag increases in fuel costs, as airlines buffer the blow for consumers.

Basically, rising fuel costs affect the overall price of road trips more than they do airfare prices.

Related: Gas prices just hit a new record high — and Memorial Day is around the corner: ‘There’s little, if any, good news about fuel prices heading into summer’

Crunching the numbers

Comparing the costs of driving and flying is relatively simple but can begin to feel like a middle school math problem in a hurry. To keep it simple, let’s compare three trips:

  • Los Angeles to San Francisco (382 driven miles).
  • Los Angeles to Denver (1,016 driven miles).
  • Los Angeles to New York (2,789 driven miles).

According to the Environmental Protection Agency, an independent agency of the federal government, the average fuel efficiency of a vehicle sold in 2020 was 25.4 miles per gallon. (More fuel-efficient vehicles will have lower costs, of course, and electric vehicles are a whole other ball of wax.)

The average price of a gallon of gasoline was $4.07 in April 2022 according to the American Automobile Association, a federation of motor clubs throughout North America. Finally, also per AAA, the average maintenance cost of driving a medium sedan is about 10 cents a mile.

So we’ll use those as the variables on the driving part of our word problem.

For the airfare, we’ll compare the average cost of a main cabin flight for the week of July 4th. We’ll also tack on $39 in add-on fees for baggage and seat assignments, the average for full-service airlines according to a NerdWallet analysis on which airlines have the best and worst fees.

Here’s how it shakes out:

Trip Distance Driving cost Airfare cost
Los Angeles to San Francisco 382 miles. $101 $137
Los Angeles to Denver 1,016 miles $269 $163
Los Angeles to New York 2,789 miles $738 $303

For the shortest trip, driving is more economical than flying. But for the longer cross-country trip, flying is far cheaper. And keep in mind that this only considers solo drivers. Families or friends traveling in one vehicle can save money by driving, even on longer routes. But this analysis does not take into account the other costs of driving, such as hotel rooms or fast food stops along the way.

See: Hoping to snag a cheap airline ticket for summer travel? Good luck, new inflation data show

Rental car costs remain sky-high

Another important factor to consider is the cost of renting a car. The average cost of a car or truck rental in March 2022 was 62% higher than in March 2020, according to the Bureau of Labor Statistics. Prices have not meaningfully dropped since last summer and remain at budget-busting levels.

The upshot, from a financial perspective, is simple: Don’t rent a car if you can avoid it.

This has an interesting impact on the decision to fly or drive. Obviously renting a car to drive long distances should be a last resort. But it could also add considerable costs for those who fly with plans to rent a car at their destination.

In other words, driving a car you own might make financial sense if it eliminates the cost of an expensive rental at the airport. Especially for short and medium trips, or trips to vacation destinations where rental cars could be especially expensive, this cost could tip the scales in favor of driving over flying.

Check out: 7 off-the-radar places worth stopping on a California road trip

The bottom line

We only compared the cost of driving versus flying this summer overall. Every trip is different and everyone has different travel preferences.

But it’s safe to say that the cost savings of flying grow with the length of the trip. Flying long distances can save you a bunch when traveling solo.

And while renting a car remains prohibitively expensive, your plans should adjust accordingly. Flying to a destination only to rent a car will eat into any potential savings, making it potentially worthwhile to drive instead.

Use this analysis as a template for your own cost-benefit breakdown. Estimate the cost of driving, look up the airfare, add on any extras like roadside hotels and rental cars, and make the call. Hurry — summer is almost here.

More From NerdWallet

Sam Kemmis writes for NerdWallet. Email: skemmis@nerdwallet.com. Twitter: @samsambutdif.