The first $35,000 Tesla Model 3s are rolling off the line this month in the US. But Tesla’s not alone in racing to meet our fossil-free future. Other car makers are also working hard to expand their all-electric offerings.

But wait—doesn’t an electric car actually emit more greenhouse gases than its conventional counterpart? After all, you still have to mine all the ingredients for its thousand-pound battery and then generate the electricity you’ll use to charge it up.

It’s a question I’ve been asked time and again over the past few months, whenever I tell people that I write about battery packs and electric cars.

It’s an understandable question. The main reason I think electric cars are worth writing about is that, once charged, they don’t emit a single gram of anything while you drive them. But that still leaves the following questions in need of answers:

How much greenhouse gas is released in mining the car’s raw materials, often on the other side of the world, as a result of the (possibly fossil-sourced) energy used in the mining process?

How much is released in refining those materials and in manufacturing and disposing of the car and its battery?

And how much is released in generating the electricity the car uses?

What follows is an attempt to quantify those answers as accurately as possible. To get the best results, I focused on one place and time: my own country of the Netherlands for the year 2017. But my findings are relevant wherever you may live and drive.

Of course, the situation will be somewhat different in other countries. In Holland, most of our electricity is generated by burning natural gas, for instance, while the US generates relatively more electricity using nuclear power plants (which—indirect emissions included—emit less CO2 than gas-fired plants). Germany, on the other hand, burns more coal and lignite (which are more polluting than gas). And in both the US and Germany, people drive relatively more highway miles than in tiny Holland. These facts produce somewhat different results.

Source: EIA via The Correspondent

Ultimately, though, these differences aren’t all that important. Once electric cars—no matter where they are—run on 100% renewable power, then the results will be pretty much the same everywhere.

In the rest of this article, I’ll limit my discussion to CO2 emissions—because when it comes to cars, carbon dioxide is by far the major contributor to the greenhouse effect. And I’ve already written in depth elsewhere about the mining industry’s impact on the local environment.

The car, the fuel, and the driving

I’ll divide my quest for hard numbers into these three phases:

manufacturing the car (including maintenance and end-of-life disposal and recycling)

producing the fuel (gasoline, electricity from mixed sources, and 100% renewable electricity)

driving the car (on-the-road emissions)

I assume that electric and gasoline cars both last for 135,000 miles, present the CO2 emissions for all three steps, and then calculate the total.

After that, I’ll use the resulting differences to look at what going full-on electric in the Netherlands could mean for the environment. In 2014, passenger transport was responsible for at least 10% of our country’s total CO2 emissions. In many Dutch towns and cities, transportation is the primary source of these emissions.

For context, these are the European Union’s climate goals: by 2050, cut CO2 emissions from road traffic by 60% (relative to 1990 levels), cut industrial emissions by 80%, and decarbonize electricity production almost entirely.

One more crucial piece of context before we begin

It may seem odd to start off a comprehensive look at the numbers with my next point, but it’s an important one: the current differences in emissions from electric and gasoline cars are largely irrelevant.

To limit climate change on the planet, we have to stop using fossil fuels. That means we need automotive technology that frees us from needing petroleum and natural gas to get from A to B. It also means we need to start generating electricity from non-fossil sources now, so that coal—and natural gas—fired power plants can be decommissioned in the next few decades.

Here’s the thing: an electric car can run on 100% renewable energy, which is by definition impossible for a car powered by petroleum products. So it’s really of limited importance whether electric cars are a greener alternative right this very second.

Another cautionary note: calculations like the ones below inherently promote a false sense of accuracy. For my calculations, I use the assumptions made by the TNO research institute, which published a report in 2015 comparing the CO2 emissions (and emissions of other gases) from different cars. I chose this report because it focuses specifically on the Netherlands—because as we’ll see, the assumptions you start with make a big difference.

Richard Smokers at TNO, who’s been making calculations like these for 25 years, warned me about that in a phone call: “If you tweak your assumptions a little, on justifiable grounds, you can end up with vastly different results.” (This note discusses two important assumptions TNO made and examples of how you might plausibly change them.)

Last but not least: knowing the points in an electric car’s life where it emits carbon dioxide is a good thing, period. It tells us where there’s room for improvement. I hope the comparison below will add insight there, too.

1. Manufacturing the car

Take a conventional car and an electric car and saw them lengthwise down the middle. The most immediately obvious difference between them is the component that provides them with energy.

Source: The Correspondent

In a gasoline car that’s a hollow vat at the back, made of plastic, steel, or aluminum: the gas tank. In an electric car it’s several hundred pounds of battery cells, usually down in the floor.

Making that battery emits far more CO2 than making a hollow tank. Aside from the energy it takes to mine the elements used in the battery, you have to consider their refinement and the battery’s production.

But just how big is that difference, exactly?

Estimates on CO2 emissions from battery production vary widely. So the researchers at TNO averaged the figures from five studies into different types of EV batteries between 2008 and 2013 and concluded that manufacturing a battery emits an average of 150 kg of CO2 per kilowatt-hour (kWh) of battery capacity.

A battery’s capacity tells you how far you can drive before recharging. If we assume an electric car needs at least 60 kWh of capacity before we’re willing to buy it, then the battery’s production—a one-time event—emits 9 metric tons of carbon dioxide.

But the battery isn’t the only difference between the cars: the body is sometimes (but not always) made of lighter materials. If that material is aluminum, then its manufacture emits more CO2 than if you’d used old-fashioned steel.

How much difference the body material makes varies significantly from one car to the next, and from one study to the next. TNO ultimately decided not to include those differences, for practical reasons.

And so we end up with a difference of 9 metric tons in CO2 emissions during the car’s production, in favor of the gasoline version.

Source: The Correspondent

2. Producing the fuel…

Now we’ve got our cars, and it’s time to hit the road. For that, we need fuel.

Gasoline is made from petroleum, which first has to be drilled, transported, refined, and then delivered to a gas pump.

A battery-powered car runs on electricity. You fill it up using a charging point at your home, on the street, or at a fast-charging station.

…assuming the Netherlands’ standard electricity mix

Electricity can be generated in many ways. Here’s how it was generated in the Netherlands in 2014:

Source: The Correspondent

How does this affect CO2 emissions?

For the current Dutch electricity mix (20% renewable and 80% traditional), TNO calculated 447 grams of CO2 per kWh. Important fact: coal-fired power plants emit roughly twice the CO2 of natural gas-fired power plants.

Generating renewable power emits an average of 36 grams of CO2 per kWh—including what’s emitted in making the solar panels and windmills.

Now we need to compare these figures to the CO2 emitted in producing gasoline. Comparing apples to apples, that’s 57 grams per kWh. That number only includes the CO2 emitted during drilling and refining.

But we’re still missing one step. When gasoline is burned—later on, when we drive off—only 22–30% of the energy is converted into forward motion. The rest is lost as heat and friction.

We have to compare that efficiency with the efficiency of a power plant and of an electric car. A natural gas-fired power plant—the kind that generates most of the Netherlands’ fossil-sourced energy—is more efficient than a conventional car: the return on a modern facility is 50–60%. But even that pales in comparison to an electric car’s efficiency.

An electric car uses 74–94% of all its energy for propulsion.

What does this mean? It means that for the Netherlands’ standard electricity mix, you only need about half as much energy to drive an electric car the same distance as a gasoline car. For sustainable electricity, you don’t even need a third as much.

…and assuming renewable electricity

Before we use these numbers in our calculations: what kind of power do the 15,000 EV drivers in the Netherlands actually use? Is it this average, largely fossil-sourced, energy mix?

The answer seems to be no.

Here’s what I found: right now, there are some 13,000 public charging points and 15,000 semi-public charging points in the Netherlands, plus a few hundred fast-charging stations.

Dutch municipalities are supposed to supply all their public charging points with renewable energy. There’s current (and justified) debate on exactly how well they’re meeting that requirement, but if we ignore the debate for now, then we can assume the Netherlands’ public charging points supply 100% sustainable power.

As far as I could confirm, semi-public charging points are only partially sustainable. That leaves a third category: the kind of power those 15,000 electric-car drivers use at home and at work, where most of the Netherlands’ charging points are installed—an estimated 72,000 at present.

There aren’t any hard and fast numbers here. The spokespeople I talked with for Fastned (a for-profit company that runs sixty fast-charging stations in the Netherlands) and for EVNet (a joint initiative of the Netherlands’ six electric power distribution system operators that manages roughly 3,000 public charging stations across the country) said they had the sense that EV drivers are generally very environmentally aware. So you’d tend to think that most electric-car owners have chosen a power company that supplies 100% renewable energy.

I calculated the two extremes: a scenario in which electric cars use the current Dutch electricity mix, with 80% generated by traditional fuels, and the ideal scenario, in which our electric cars all use 100% renewable energy.

That gives us the following results for the car’s fuel production, which instantly reveals why charging your EV with sustainable electricity is an excellent idea.

Source: The Correspondent

* A lifespan of 135,000 miles is the figure used for US midsize cars by the UCS in their 2015 report, Cleaner Cars from Cradle to Grave. The Dutch TNO’s lifespan assumption (used for these calculations) is a shade longer: 220,000 km (or 136,700 mi).

3. Driving the car

The gas tank is full, the battery’s been charged. Now we can hit the road!

According to TNO, burning gasoline in a modern compact car releases an average of 275 grams of CO2 per mile driven. An older or larger car will release more. Assuming you drive it for 135,000 miles, it will emit a total of over 37 metric tons of CO2.

And how much CO2 will the electric car emit? Zero. Nada. Zip. Draining a battery doesn’t emit even one molecule of carbon dioxide.

And just like that, the gasoline car is now the worse polluter.

Source: The Correspondent

* A lifespan of 135,000 miles is the figure used for US midsize cars by the UCS in their 2015 report, Cleaner Cars from Cradle to Grave. The Dutch TNO’s lifespan assumption (used for these calculations) is a shade longer: 220,000 km (or 136,700 mi).

The grand total: lifetime CO2 emissions for electric vs. gasoline cars

Source: The Correspondent

* A lifespan of 135,000 miles is the figure used for US midsize cars by the UCS in their 2015 report, Cleaner Cars from Cradle to Grave. The Dutch TNO’s lifespan assumption (used for these calculations) is a shade longer: 220,000 km (or 136,700 mi).

To recap our story so far: manufacturing an electric car’s battery belches out a bunch of CO2 at the beginning. But even if we run that car on the Netherlands’ current electricity mix, the average EV is still significantly cleaner than the average conventional car. That’s because producing both a car and its fuel ultimately contribute far less to its CO2 emissions than the actual driving.

In practice, electric cars in the Netherlands probably use power that’s cleaner than the country’s average mix, making an EV’s total CO2 emissions even lower.

But the real point is this: an electric car running on 100% renewable power emits just a third of the CO2 a gasoline car emits, even with today’s technology.

This—eliminating CO2 emissions while driving—is where we need to get to, and thanks to the invention of the electric car, we can get there. As a bonus, the electric car’s battery will serve as part of the solution we so desperately need for storing excess renewable energy.

What does this mean for the climate?

If we’re going to limit global warming to 2 degrees celsius in the coming century, our road traffic emissions in the Netherlands will have to drop by 60% in 2050 compared to 1990 (that level is roughly the same as in 2015). Here we’re talking about the CO2 emitted during actual driving, for all vehicles.

With on-road CO2 emissions of zero-nada-zip, the electric car is an excellent means toward this end. (You might say it’s what it’s made for.) That’s why the Netherlands Environmental Assessment Agency has concluded that by 2035 we should stop selling gasoline cars altogether. And the environmental committees of the four political parties likely to be in the Netherlands’ next coalition government have even set the date ten years earlier.

But that’s not all. Carbon dioxide emissions from energy production in the European Union must also drop, by at least 80%. It’s clear how the electric car fits in there: all EVs need to move to 100% sustainably sourced electricity as soon as possible. Because generating power from the wind and the sun is a zero-carbon activity.

Three developments that will make the electric car even cleaner–much cleaner

So now we know that manufacturing batteries for electric cars emits a lot of CO2. But that’s also precisely where promising opportunities for improvement lie.

For an earlier article in this series, I visited Umicore, an innovative Belgian company that’s betting big on battery recycling. Right now they’re targeting cell phones, but they’re already adapting their facilities to handle electric car batteries. In fact, they’ve recently partnered with Tesla.

What I learned at their plant, which I’d never heard before, is this: we can already recycle the heck out of EV batteries. Even today, we reclaim more than 95% of the three major metals they contain: nickel, copper, and cobalt. And a reclamation process is currently being developed for lithium—the metal the battery is named for, though it’s not its major component.

We will undoubtedly cause more damage to the earth and the environment as we mine the materials to build electric cars. But in contrast to drilling for oil, this mining will be a finite process. At some point in time, we’ll barely need new mines at all.

What’s more, the opportunities for EV and battery innovation are huge—much greater than for conventional cars and petroleum. For example, countless researchers around the world are currently looking for ways to replace graphite by the more easily obtained silicon, which has a much higher energy density. Graphite mining is a major polluter, and the mineral is hard to recycle.

Last but not least, battery factories can become greener, much the way electric cars can. For the calculations in this article, I followed the lead of expert researchers and assumed that battery factories use largely fossil-sourced electricity in the production process. They, too, could switch to using renewable energy—and some already have.

Tesla, for example, is building a massive zero-emissions factory in Nevada. Instead of a pipeline pumping in natural gas, the Gigafactory will have a roof packed with solar panels. Windmills surrounding the plant will generate the rest of the energy required .

Recycling, innovation, and the greening of factories can dramatically reduce the CO2 emitted during EV battery production. For those reasons, the figures I’ve used in this article are more likely too conservative than too optimistic, even for the immediate future.

Want to know more about the situation in other countries?

Before I realized I needed to focus on one country for my computations, I reviewed several international life-cycle and cradle-to-grave analyses. For those of you interested in the international context, here’s a short list to check out:

The Union of Concerned Scientists wrote an easy-to-read report on its two-year analysis of climate emissions from cars: “Cleaner Cars from Cradle to Grave” (2015)

A recent paper in the academic journal Applied Energy analyzes the situations in Brazil, China, France, Italy, and the US (2016)

A report by the University of Dresden that calculates more somber figures for Germany (2014; in German)

A white paper by World Auto Steel takes a closer look at the difference in CO2 emissions from using steel vs. aluminum car bodies (2016)

—Translated from Dutch by Grayson Morris and Erica Moore

This article originated on The Correspondent, your ad-free antidote to the daily news grind. Want more? Sign up for The Correspondent newsletter or keep up with us on Twitter and Facebook.