If the idea of swarms of delivery drones dropping packages all over our cities started out as a joke, for some reason the punchline hasn’t landed yet. Amazon applied for a patent in 2015 for a command center, like a beehive, plopped into your city, which isn’t a worrying metaphor at all. Google has its own program in the works, which at least for the moment involves delivering burritos. Again, if this is a joke, it’s got a very long fuse.

Forget about the insane logistics of such a system for a moment, or if you’d even be keen on drones swarming your town. The big question is: Would this actually be a better, more efficient way to go about things than traditional delivery trucks? Without a real system in place, that’s tough to answer.

But today in Nature Communications, a group of researchers have taken a shot at modeling the energy efficiency of delivery drones, and compared it to classical fleets of delivery trucks. Which comes out on top? It depends, basically—on a slew of factors that you probably haven’t begun to think about. But they’re the same ones companies and regulators will have to chew on as automated delivery becomes more plausible.

First off, different regions of the country employ different levels of renewable energy like solar, which means charging all those drones would release different amounts of carbon dioxide depending on where you live. So for this study, the researchers compared emissions impacts at both ends of the spectrum: in a very green state, California, and a very not green one, Missouri.

“What we found were mixed results,” says lead author Josh Stolaroff, an environmental scientist at Lawrence Livermore National Laboratory. “There is a possibility drones can reduce greenhouse gas emissions and reduce energy use, but you have to be careful how you deploy them.”

For a small drone to operate out of a warehouse in California, it’d be responsible for about 430 grams of CO 2 per package delivered, compared to a diesel delivery truck producing 915 grams. But in less-than-green Missouri, a small drone would be responsible for about 850 grams of CO 2 per package, while a truck would emit 1,100 grams. So for California, that’s an emissions savings of 53 percent; in Missouri, 23 percent.

But location isn’t the only thing that can influence emissions—you have to factor in size, too. The researchers modeled two different drones, that small quadcopter that could carry a 1-pound package and a larger octocopter that could manage 17.5 pounds. (They tested them in the real world at different speeds and wind conditions, then plugged that data into their models.)

“On the other end of the spectrum,” says Stolaroff, “the large drone is 9 percent better than a diesel truck in California, and 50 percent worse than a diesel truck in Missouri.”

The model, though, has to make some assumptions that might not line up with how the real-world implementation of delivery drones shakes out. For one, drones in the simulation run routes as the crow flies. “In the real world, depending on how they're regulated, there might be designated routes that drones have to follow,” says Stolaroff. “Then that's going to make the paths long, it's going to mean you'll need the drones to go farther, or you need more warehouses to service the same area.”

That’s a relevant difference, because given current battery technology, one drone carrying one package to one destination can fly just a little over two miles. These researchers assumed that warehouses—where drones could load up and charge—would be built to accommodate that limited range. The relatively small city of San Francisco would need four, while the greater Bay Area would need over 100.