We interviewed logistics and transportation experts to create a flowchart to help you answer this deceptively complex question.

Is it better to shop online or in the store? If you’re trying to minimize your carbon footprint, it’s not a simple question.

“Unfortunately, the answer is, ‘it depends,’ ” said Miguel Jaller, co-director of the Sustainable Freight Research Center at the University of California, Davis.

“E-commerce has the potential to generate benefits when we’re able to take advantage of consolidation with the vehicles”—in other words, when one truck is making many deliveries in your neighborhood.

Shipping companies work hard to minimize fuel costs. UPS, for example, spent $3.4 billion on fuel in 2018. The company famously directs its drivers away from left turns, which it estimates saves 10 million gallons of fuel every year.

You probably don’t think quite as intensely about your route to the store, and for one or two things, driving a two-ton vehicle isn’t very efficient.

Online often has a lower footprint, but not always.

“If you are always taking public transit and walking and biking to buy your products, then you should continue to do so,” Jaller said.

Same if you’re buying more than four items or if you’re combining the trip with something like driving to work.

Returns can tip the scales, making a trip to the store the low-footprint option.

“One of the limitations of online channels is you cannot try some of the products,” Jaller said.

Returns typically add 20–25% more emissions per product, but for things like clothing and footwear, where we’re fickle about sizing and fit, they can add up to 50% more.

You can reduce the footprint of your returns if online is your only option.

Check if a package carrier can pick up the item on their usual route. It may cost a few dollars, but it’s convenient and takes advantage of the truck’s return trip.

If that’s not possible or appealing, the other thing you can do is combine your return drop-off with another trip. (Seeing a trend here?)

Slower shipping is another way help your online shopping come out ahead.

If you don’t need something right now—or in two hours or two days—then pick the slower shipping option.

The UPS driver who makes several stops in your neighborhood? They’ve consolidated their deliveries. The person delivering a pencil case from Prime Now or a bag of tortilla chips from Instacart? Not so much.

“Quicker things are more energy intensive because one of the main ways we reduce cost and energy consumption in transport is through consolidation,” said Anne Goodchild, director of the Supply Chain Transportation and Logistics Center at the University of Washington. “The more you can wait, the slower that can be, generally speaking the more that supply chain is able to be efficient and conserve energy.”

What you can do: If you’re a regular at Amazon, Goodchild recommends trying their “Amazon Day” feature, where orders are consolidated so they arrive on your preferred day or two every week.

In a sense, Amazon Day mimics what many of us do in the real world but fail at when shopping online.

“If you are going to the grocery store, you make a list so you don’t have to go ten times in a day to buy different things,” Jaller said. “But online, we tend to order, and then we forgot something and make another order, and then we forgot and make another order.”

Consolidated delivery programs like Amazon Day also have the potential to reduce the number of boxes you receive. Goodchild has found mixed results—items will arrive on the same day, though sometimes in different deliveries. Still, “it’s a step in the right direction,” she said.

The overarching problem is that consumers don’t have the information they need to make climate friendly decisions. “Realistically, we could do better than needing each consumer to go do a research project every time they buy a pack of pencils,” Goodchild said.

With that in mind, we’ve created a flowchart to help you navigate it all.