I don't think anyone really enjoys filling up the gas tank. It feels like you are just standing around when you could be getting somewhere. If you get gas on your hands or shoes, you smell like it all day. And on top of all this, you actually have to pay for it. With gas prices over $4 a gallon (up to $6 in some states), we are all too painfully aware that gas isn't cheap.

Of course, there are many things you can do to spend less at the pump. The US Department of Energy has some tips to help you save fuel, which include removing roof cargo and the extra stuff in your trunk, using cruise control, and even turning off your engine while waiting in the drive-through line. You could also reduce how much you drive by carpooling or working from home. Finally—and this is the important one—you could just drive *slower*. Every car gets better gas mileage at 50 miles per hour than at 70.

But that gives us an interesting problem to solve: What commuting speed saves you the most money?

Here is the dilemma: If you drive fast, it takes more gas, which costs more money. If you drive slower, it takes less gas, so you will save money. But you will also sacrifice time—time you could spend on the clock at work, *earning* money. There should be some optimal driving speed at which the total cost (gasoline plus missed work) is minimized. This minimum cost will depend on the fuel efficiency of your car and how much you earn per hour.

Fuel Efficiency and Speed

If you turn on your engine and just idle there, you are still using gasoline. (Electric vehicle drivers, this does not apply to you.) At a speed of zero miles per hour, your gas mileage will be 0 miles per gallon (mpg), since you didn't actually go anywhere. Increasing the speed to 10 mph will also increase your fuel efficiency, since it can't get any lower than 0 mpg. But it might not be the best gas mileage. Your car is still using gas just to run the engine (and the AC and your very loud radio), and you’re not traveling very far.

Once you get up to much higher speeds, you have some other factors that ruin your efficiency. One is all the air your car is now pushing against as it moves. Your engine has to work harder so that it can rotate your tires and keep moving the car forward despite this resistance. You can see the effect of air resistance if, while driving on level ground, you shift your car from drive to neutral and take your foot off the brake. The car will start to slow down due to this interaction with the air.

The magnitude of this backwards-pushing force, known as air drag, increases with increased speed. You can feel this drag if you stick your hand out of the window of a moving car. If the car is driving slowly, you barely feel that force. At highway speeds, it is quite significant.

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

Meanwhile, the tires also deform a little bit as they roll. This deformation requires some energy and has the same effect as a backwards-pushing force. (We call this “rolling friction.”) There are also some types of frictional forces between engine parts and within the transmission. The net effect of all these forces is that you have to burn some gasoline to overcome them. You have to continue to press down on the gas pedal just to keep moving at a constant speed.

There are enough factors that influence the mileage of a car that you can't really create a purely theoretical model that gives a relationship between speed and mpg. Fortunately, some people tested a bunch of cars and created at least an approximate way to estimate fuel efficiency: It’s a 2013 paper from Oak Ridge National Laboratory that produces multiple speed-efficiency models. (It’s called “Predicting Light-Duty Vehicle Fuel Economy as a Function of Highway Speed,” if you’re curious.)

The simplest model from this paper estimates fuel efficiency using just two values: the Environmental Protection Agency’s rated highway fuel efficiency (that’s the MPG sticker on new cars) and the speed. Let's use *U* for the EPA fuel efficiency and *v* for the speed (in mph). We can then calculate the efficiency as the following:

I know that equation looks bizarre, but it's actually pretty useful. Let's say that you have a car with an EPA-listed highway mileage of 33 mpg. According to this, driving at 50 mph would give you 47.6 miles per gallon and driving at 70 mph would get you only 36.1 mpg.

You might be wondering what highway speed the EPA uses for that official rating. The answer is none. They don't actually drive a car at a certain speed and measure how much fuel was used. Instead, they put it on a machine that takes it through a pattern of speeds, and *then* they see how much fuel was used overall. It seems weird, but all the cars in the United States are tested this way.

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

Just for fun, let's make a plot of the fuel efficiency for different cars at different speeds. Remember, the only variable that has an effect is the EPA-rated mpg. The make, style, or color of the car doesn't matter—if it has the same EPA rating, it will have the same efficiency-speed curve. With that, here's the plot for three different cars at 30, 40, and 50 mpg:

Notice that more efficient cars (like the EPA 50-mpg one) are more influenced by the increase in speed. But a 40-mpg car is *still* better than a 30-mpg car. Why doesn’t an increase in speed have as big an effect on lower-mpg cars? It’s because if you start at 30 mpg, you can only decrease by 30 mpg before you get to zero mpg. They don’t have as much room to get terrible mileage.

Time Is Money

Let's jump over to the time it takes to drive to work. Of course, if you drive faster you will get there in a shorter amount of time. Imagine that I have to drive 40 miles to work. (You might think that's far, but trust me—people go that far all the time.) How long would this take if I set my cruise control at 70 mph?

Starting with the definition of average velocity and solving for the time (Δt), we get:

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

If we use a distance (Δx) in units of miles and the speed (v) in mph, then the time will be in units of hours. With a speed of 70 mph, I get a travel time of 34.29 minutes.

What if you repeat the drive with a speed of 65 mph? In that case it takes 36.92 minutes. Yes, that's a giant time difference of 157.8 seconds. I mean, that's not even one song on the radio.

But what about money—how much cash do you "waste" by taking a little bit longer to get to work? Let's do another simple calculation. Suppose that your job pays $20 an hour. By driving 5 mph slower, that's 157.8 seconds that you are sitting in your car and not working. (Let’s assume that by driving slower you are actually clocking in late and missing out on hourly pay. You could, of course, make up the time by leaving earlier, but that costs you something else—sleep.) Converting that time, it's equal to 0.0438 hours. At $20 an hour, this would be just over 87 cents.

Now we need to put these two ideas (travel speed and hourly wage) together to get a generic expression for the money "lost" during your commute. Let's say your pay rate (in dollars per hour) is *R* and the money you earn is *P*. Then *P* = *R*Δt.

Using the time expression from above (based on speed and distance) gives the following:

Remember, this is the amount of money that you would essentially lose. The farther you drive and the higher your hourly wage, the more you will lose. If you drive faster (increase v), you will lose less money.

Note to self: Don't live far from your job if at all possible.

Effective Commuting Cost vs. Speed

So driving faster wastes more money because you use more gasoline, but driving slower wastes money because time is money. Before we can get the total commute cost, I need to know one more value first: the price of gasoline. I'm going to represent the cost of gas as *G* in dollars per gallon. (It should have a value of something like $4.23, which was the national average this week according to the American Automobile Association.) In order to find the money spent on gasoline, I would take this value and multiply by the distance (in miles) and divide by the actual efficiency (in mpg).

This along with the money lost due to time gives me a total cost (*C*) as the following:

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

Notice that I am writing the fuel efficiency as mpg (U,v) to indicate that this is a function of both *U* (the EPA rating) and *v* (the speed). Also, since both terms have a Δx term (the distance traveled), we can factor that out. This is actually very important. It means that instead of looking at the cost of the trip, I can calculate the cost per mile (by dividing both sides by Δx). So, the best speed (with the lowest cost) doesn't actually depend on how far you have to drive.

How about some actual numbers? Here is a plot of the cost per mile vs. speed for a car with an EPA rating of 25 mpg and a driver with an hourly pay rate of $15 dollars. Just to make things fun, I'm going to use a gasoline price of $7.20 per gallon (even though it won't actually be fun if the price gets that high).

Note: This is actual code. If you click the pencil icon, you can change the starting values and run it again. (Try it with your own hourly pay and the cost of gas where you live.)

You can see that with these values, the best commuting speed is 66 mph for a distance cost of 48 cents per mile. Each trip of 30 miles would cost $14.41. *Ouch*.

Of course, you can see that if your pay rate is higher than the federal minimum wage, which is currently $7.25, and you have a very efficient car, this will calculate a speed that's probably greater than the posted speed limit—and that’s not safe. Don’t speed, everyone.

Most PopularThe End of Airbnb in New York

BusinessAmanda Hoover

This Is the True Scale of New York’s Airbnb Apocalypse

BusinessAmanda Hoover

*Starfield* Will Be the Meme Game for Decades to Come

Will Bedingfield

The 15 Best Electric Bikes for Every Kind of Ride

GearAdrienne So

OK, I'm going to make one more graph to show what would happen if things get outrageously bad and gas prices reach $11.40 per gallon. For this plot, I'm going to assume a pay rate of $20 dollars per hour.

Even with a fuel efficiency of over 45 mpg, you still shouldn't drive faster than 70 mph if you want to save money.

In the end, you can see that time is money. But gasoline is also money. So, saving gasoline is sort of like saving time.

Of course, the easiest solution for this problem is to just work from home. Or if that’s not possible, to sleep in your office.

More Great WIRED Stories📩 The latest on tech, science, and more: Get our newsletters!It’s like GPT-3 but for code—fun, fast, and full of flawsYou (and the planet) really need a heat pumpCan an online course help Big Tech find its soul?iPod modders give the music player new lifeNFTs don’t work the way you might think they do👁️ Explore AI like never before with our new database🏃🏽♀️ Want the best tools to get healthy? Check out our Gear team’s picks for the best fitness trackers, running gear (including shoes and socks), and best headphones