When companies commit to 100% renewable electricity–or reach that goal, like Apple, Lego, Google, and others already have–they celebrate it as a win for the climate. But a new study makes clear that the impact of a switch to renewables depends on how it’s implemented—”100% renewable” doesn’t mean the same thing as 100% carbon-free.

If a company buys solar power, for example, that doesn’t mean that it runs on solar power all of the time. Achieving the goal of 100% renewable just means that it’s buying enough solar power over a year to match its annual use. Even factories or stores with solar panels on the roof are connected to the grid, and when the sun isn’t shining, the grid isn’t getting power from solar.

Instead of calculating the emissions cuts over a year, the study says, companies should look at hourly averages. “If you do accurate accounting, it becomes really clear that you need to think about 24 hours a day if you really want to reduce your emissions to zero,” says Sally Benson, a professor in the Energy Resources Engineering Department in the School of Earth, Energy & Environmental Sciences at Stanford University and one of the authors of the study.

The study looked at the example of California, where renewable energy is growing as the state ramps up to 100% renewables by 2040. On a sunny day, the grid can have so much extra solar power that some solar or wind farms have to shut down; more demand for renewables won’t help replace fossil fuels, since fossil fuel plants already may not be running as solar power is peaking. At night, the grid runs on sources like natural gas. As more renewable energy is added to the grid, the problem will be magnified. By 2025, the study says, if a company was calculating its emissions reductions in California by looking at annual averages instead of hourly averages, it could overstate those reductions by 50%.

Batteries to store excess renewable energy could help, though today’s technology isn’t a full solution, Benson says. “Batteries are good for a couple of hours of storage, but it’s very expensive to provide 24 hours a day,” she says. They also have environmental issues of their own. “Most of them are built in China with coal-based power so that when you look at the full life-cycle emissions of [solar panels] plus batteries, at some point if you put on too many batteries, the benefits of putting on those batteries start going away.” New storage technology, like towers that store energy using gravity, might be better. Companies aiming to cut their carbon footprints could also carefully invest in a mix of sources–like wind, solar, and hydropower–to help make it more likely that renewable power is available when it’s needed.

Most companies haven’t fully explored the real emissions impact of their shift to renewables, says Benson. “Most companies were happy just to buy enough energy to offset their total annual energy use from a renewable source. And they really weren’t thinking about this day-night issue, for example.” But that’s starting to change: Both Google and Microsoft are examples of companies that are shifting to hourly accounting. Benson hopes that the study helps convince others to follow. “We’re just trying to raise awareness so that people start asking the question, am I getting clean power every hour of the day?”