What is the carbon footprint of your EV, really?

Electric Vehicles are an attractive option for the environmentally conscious commuter chiefly due to their lack of exhaust pipe. But do EVs have a secret carbon footprint that is hidden away from us? The short answer is yes, but they are still largely better in this regard than traditional internal combustion engine vehicles. If you are considering buying an EV with carbon emissions as your primary concern, going electric is probably your best choice, but there are cases when a hybrid may actually be better (for now)!

When I bought my car (a Hyundai Ioniq Hybrid) in 2021, I was most concerned about two metrics: fuel efficiency and range. Range is important to me, as I love nothing more than a 4,000–mile road trip around the American West. High efficiency is a high priority because I will not only spend less at the pump, but also belch less CO₂ into the air as I drive. As I was shopping and researching, this last point kept bubbling up in my brain — just how much CO₂ will a given car emit per mile? Even electric vehicles must produce some CO₂ (albeit indirectly) since they must be charged from the grid, which unfortunately still depends on carbon.

Gathering Data

For traditional and hybrid vehicles, finding the necessary data is straightforward: the listed fuel efficiency tells us exactly how much fuel is used per mile, and with some stoichiometry it should be possible to calculate how much carbon dioxide is emitted per mile. Being unfamiliar with EVs regarding their marketing and metrics, I wasn’t sure exactly what to look for. A man can dream, wistfully longing for reasonable units of kilojoules per meter, but deep down he knows that he is destined to deign to deal with deplorable customary units. A wise man fears only three things, after all: the sea in storm, a night with no moon, and the horrifying ambiguity of US customary units.

Let us start with the more familiar case: gas guzzlers. We do need to be careful here – are gasoline and diesel equivalent in the amount of CO₂ produced from the combustion of equivalent masses of each? Ah, our first problem: fuel is measured in gallons, but we need mass if we are to have any hope of doing stoichiometry. So, what is the density of gasoline? In fact, what is gasoline?

What is Gasoline?

Some quick research leads us to gasoline being a “mixture of lightweight hydrocarbons” with between 4 and 12 carbons per molecule1. Furthermore, gasoline composition deliberately varies by season so that in summer months there are less volatile species in the mix than in winter. This is disheartening, is there any way to get accurate numbers? Wikipedia uses pure octane as a “representative species” which is likely a good approximation. However, I found this pdf which provides the following data from a 1989 Air Force study:

Major Components of Gasoline by Mass Percent
Component Mass %
n-alkanes
C5 3.0
C6 11.6
C7 1.2
C9 0.7
C10-C13 0.8
total 17.3
branched alkanes
C4 2.2
C5 15.1
C6 8.0
C7 1.9
C8 1.8
C9 2.1
C10-C13 1.0
total 32.0
Component Mass %
cycloalkanes
C6 3.0
C7 1.4
C9 0.6
total 5.0
olefins
C6 1.8
total 1.8
aromatics
benzene 3.2
toluene 4.8
xylenes 6.6
ethylbenzene 1.4
C7-benzenes 4.2
C8-benzenes 7.6
others 2.7
total 30.5

Note

Since the table distinguishes between n-alkanes and branched alkanes, I am interpreting the former to mean “straight chain alkanes”.

So we have 5 classes of organic compounds to consider: n-alkanes, branched alkanes, cycloalkanes, olefins, and aromatics. We also have the rather glaring issue that the totals sum to 86.6%. I am willing to rely on these data, as another source 2 has similarly “incomplete” data due to the intractable challenge of trying to give a definite composition of a substance that is almost by definition an imprecise mixture.

Since an exact answer is unknowable, we are forced to approximate. The major components listed in the above table are C₅ and C₆ branched and unbranched alkanes, benzene, toluene, and xylenes totalling 52.3% of the mass of gasoline. As this is half the content of gasoline, I am fairly confident that the resulting mass of CO₂ from combustion is representative of any arbitrary bulk quantity of gasoline.

Stoichiometry

Thankfully for our stoichiometry, alkenes (branched and straight) have the formula CnHn+2. Benzene has a formula of C₆H₆, toluene C₇H₈, and xylene C₈H₁₀. Combining all hydrocarbons with identical formulae, we arrive at the following breakdown, where the relative mass percent is taken a fraction of the 52.3% that we are interested in. Note that the relative mass percent sums to 100%.

FormulaMass %Rel. Mass % Balanced Combustion Reaction
C₅H₇ 18.1 34.6 4C5H7 + 27O2 = 20CO2 + 14H2O
C₆H₈ 19.6 37.5 C6H8 + 8O2 = 6CO2 + 4H2O
C₆H₆ 3.2 6.1 2C6H6 + 15O2 = 12CO2 + 6H2O
C₇H₈ 4.8 9.2 C7H8 + 9O2 = 7CO2 + 4H2O
C₈H₁₀ 6.6 12.6 2C8H10 + 21O2 = 16CO2 + 10H2O

Anyone who has taken a chemistry class recently will know the horrors of balancing hydrocarbon combustion reactions. Everyone else will have blocked such traumas from memory. Thankfully, I was able to use my own chemical equation balancing software to do the work instantly.

The important values to take away from the above table are the ratios of moles of CO₂ produced per mole of reactant. In order, these are 5 for pentanes, 6 for hexanes and benzene, and 8 for xylene. It was at this point that I felt a bit silly for not considering the one-to-one correspondence between an atom of carbon in the reactants and a molecule of CO₂ in the products, but the confirmation that everything works as it should is heartening.

We shall consider one kilogram of our idealized gasoline. Then the pentanes will have a total mass of 346g, and so on to 126g of xylenes. For each constituent, we divide its mass in grams by the molar mass of the compound to find how many moles are in one kilogram. We then multiply by the mole ratio of moles CO₂ : moles reactant to arrive at moles of CO₂ produced. Finally, we multiply by the molar mass of CO₂ (44.01 g/mol) to get the total mass of CO₂ produced by combustion.

Species Moles/kg fuel Mole Ratio Mol CO₂ g CO₂
C₅H₇ 5.16 5 25.80 1135
C₆H₈ 4.68 6 28.08 1236
C₆H₆ 0.78 6 4.68 206
C₇H₈ 1.00 7 7.00 308
C₈H₁₀ 1.19 8 9.52 419
Total3304 grams CO₂

Somewhat shockingly, for each unit of mass of fuel burned, over three times that mass of carbon dioxide is released into the atmosphere. This extra mass comes from the newly attached oxygen atoms, which are heavier than the carbon itself.

The last step in our process is to find kg CO₂ per liter of burned fuel. The first Pdf claims a density of between 0.7 and 0.8 kg/L, so we are looking at a range of 2.310 to 2.640 kg CO₂/L. This figure agrees precisely with that given by Wikipedia, and the same source provides a similar 2.6 kg CO₂/L of diesel.

How Dirty is the Grid?

The task now is to find how much carbon is produced per kilowatt-hour of grid electricity. The EIA publishes thorough annual data on the subject, though it is largely scattered around in excel files. They do offer a programmatic API which I may look into in the future, but for now I was able to find U.S. Electric Power Industry Estimated Emissions by State and Net Generation by State by Type of Producer by Energy Source from the EIA FAQ page.

To filter out the data I actually want3, I exported each file to a CSV using a semicolon as the delimiter since some cells contain commas. Awk was the right tool for the job in this case since I only want data from specific columns that match the following conditions:

For the annual generation data,

After that, only the state and generation columns are needed in the output, those being the 2nd and 5th columns respectively.

Similarly for annual emissions,

The state and metric tons of CO2 are–coincidentally–again in the 2nd and 5th columns.

1# Generation (Megawatt-Hours)
2awk -F';' '$1 == "2022" && $3 ~ /Utilities/ && $4 =="Total" {print $2, $5}' annual_generation_state.csv
3# and if we want to sort from highest to lowest, we can pipe this into `sort`
4awk -F';' '$1 == "2022" && $3 ~ /Utilities/ && $4 =="Total" {print $2, $5}' annual_generation_state.csv | sort -hr -k 2
5# Emissions (Metric Tons CO2)
6awk -F';' '$1 == "2022" && $3 ~ /Utility/ && $4 == "All Sources" {print $2, $5}' emission_annual.csv

Unfortunately, New Hampshire and Maine are both missing from the Emissions data. A quick inspection shows that the most recent datum for Maine is in 2018 and New Hampshire is in 2020. For this reason, I looked at years besides 2022 and found that there are several other states with missing data throughout the dataset. To account for this, I decided to include data for all years, where missing data are interpolated between known values. The data were again initially processed using Awk, followed by a python script to get everything into one JSON file.

1awk -F';' '$3 ~ /Utility/ && $4 == "All Sources" {print $2, $1, $5}' annual_emissions.csv | sed 's/, /,/g' > CO2.csv
2awk -F';' '$3 ~ /Utilities/ && $4 =="Total" {print $2, $1, $5}' annual_generation_state.csv | sed 's/, /,/g' > ENERGY.csv
 1#!/usr/bin/env python3
 2import csv
 3import json
 4
 5NUM_YRS = (2022 - 1990) + 1
 6
 7def interpolate(lst):
 8    '''Linear interpolation for missing data'''
 9    beg = 0
10    while beg < len(lst):
11        if lst[beg][0] != 0:
12            beg += 1
13            continue
14        end = beg
15        run = 0
16        while end < len(lst) and lst[end][0] == 0:
17            end, run = end + 1, run + 1
18        if beg == 0 and end == len(lst):
19            return
20        if beg == 0:
21            lst[beg:end] = [(lst[end][0], True)] * run
22        elif end == len(lst):
23            lst[beg:end] = [(lst[beg-1][0], True)] * run
24        else:
25            factor = (lst[end][0] - lst[beg-1][0]) / (run + 1)
26            lst[beg:end] = [((lst[beg-1][0]+(1+x)*factor), True) for x in range(run)]
27        beg = end
28
29
30def to_dict(csv_file):
31    data = {}
32    with open(csv_file + ".csv", mode='r') as file:
33        csv_reader = csv.DictReader(file)
34        for row in csv_reader:
35            state = row['state'].upper()
36            year = int(row['year'])
37            value = int(row['value'])
38            if state not in data:
39                data[state] = [(0, False)] * NUM_YRS
40
41            data[state][year - 1990] = (value, False)
42
43    for state in data:
44        interpolate(data[state])
45
46    return data
47
48def main():
49    carbon_raw = to_dict("CO2")
50    energy_raw = to_dict("ENERGY")
51    emissions = {state: [(0, False)]*NUM_YRS for state in energy_raw}
52
53    for state in energy_raw:
54        for i in range(NUM_YRS):
55            energy = energy_raw[state][i]
56            carbon = carbon_raw[state][i]
57            try:
58                result = carbon[0] / energy[0]
59                emissions[state][i] = (round(result, 5), carbon[1] or energy[1])
60            except ZeroDivisionError:
61                emissions[state][i] = (None, carbon[1] or energy[1])
62
63
64    with open('EMISSIONS.json', 'w') as file:
65        json.dump(emissions, file)
66
67
68if __name__ == '__main__':
69    main()

The result of the above script is a list of ordered pairs for each state where the first value is the rate of emissions, and the second is a boolean (true/false) value indicating if the data was interpolated.

CO2 Emissions Per kWh Blank map of the United States, territories not included Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia West Virginia Wisconsin Wyoming District of Columbia District of Columbia
kgCO2/kWh
Color by

I used the processed data to create the above map. By moving the year slider, we can see the general trend that the grid has been getting greener over time. This trend is most apparent when selecting an option to color by all years, as the states will be colored according to the overall 33-year average. A state colored with diagonal hatching indicates that the value was estimated by linear interpolation for that year.

When creating the visualization, I elected to omit outliers by an elementary interquartile range test, which discounts data points outside the range \([\mathrm{Q1} - 1.5\times\mathrm{IQR},\mathrm{Q3} + 1.5\times\mathrm{IQR}]\). Outliers are then colored according to the max or min value of the color scale accordingly. Washington D.C. was regularly the worst offender, reporting hundreds of kgCO2 per kWh, when the typical range is around 0 to 1. This can be explained several ways, but most trace back to the fact that D.C. is just very small.

Hummm barummmm — That doesn’t make sense to me. But then, you are very small.
Treebeard, The Two Towers

How Much Carbon Dioxide do Electric Cars Emit?

Most consumers care more about range than other metrics for EVs, so range is what we see published. As predicted, the horrors of the US Customary System abound, with many listings showing a particularly cryptic MPGe, or, “Miles per gallon gasoline equivalent”. I could dive into what that means here, but quite frankly I do not want to waste braincells on ridiculous units.

Although the kilowatt-hour is not my favorite unit of energy, it is useful for our purposes since most statistics about the grid are reported in terms of watt-hours. The joule is the SI unit of energy, and the watt is the SI unit of power (energy per unit time) measured in joules/second. A watt-hour is the amount of energy used by a load that draws one watt of power for one hour, calculated by multiplying these units: \(1 \text{W} \cdot 1 \text{h} = 1 \frac{\text{J}}{\text{s}} \cdot 3600 \text{s} = 3600 \text{J}\).

Miraculously, Wikipedia again comes to our rescue — the article on MPGe contains a beautiful table of electric vehicles with fuel economy presented in sensible units. The standard seems to be kWh/100 km, similar to Europe’s L/100 km for gasoline petrol cars. This is in some sense reciprocal to the miles per gallon we are used to as distance is in the denominator, meaning lower is better for this metric.

To answer how much an EV emits, we need to know its efficiency and what state it lives in. Let’s take a Hyundai Ioniq 6 (15.0 kWh/100 km) in the two extremes of Vermont (0.009 kgCO2/kWh). \[ \frac{15.0\text{kWh}}{100 \text{km}} \frac{0.009 \text{kg CO}_2}{\text{kWh}} = \frac{0.00135 \text{kg CO}_2}{\text{km}} \] and West Virginia (0.953 kgCO2/kwH) \[ \frac{15.0 \text{kWh}}{100 \text{km}} \frac{0.953 \text{kg CO}_2}{\text{kWh}} = \frac{0.143 \text{kg CO}_2}{\text{km}} \] And compared to my Hyundai Ioniq Hybrid that regularly gets 55 mpg (4.3 L/100 km) we can take the optimistic \[ \frac{4.3 \text{L}}{100 \text{km}} \frac{2.310 \text{kg CO}_2}{\text{L}} = \frac{0.099 \text{kg CO}_2}{\text{km}} \] or the conservative estimate \[ \frac{4.3 \text{L}}{100 \text{km}} \frac{2.640 \text{kg CO}_2}{\text{L}} = \frac{0.11 \text{kg CO}_2}{\text{km}} \] We can clearly see that even with the worst-case estimates for gasoline-based carbon emissions, my car still effectively belches out less greenhouse gas than a fully electric car in West Virginia! Of course, this isn’t entirely fair since I picked the most coal-hungry state in the union to compare against. Not to mention the fact that an EV in Vermont outperforms me by a factor of 100.

Interactive Summary

To make it easier to interpret the my findings, I present another map. Once again, there is a year slider on top to select emissions data from a specific year. Then, there are two additional sliders, one for gas vehicle efficiency and one for EV efficiency, each arranged so that sliding to the right indicates greater performance. Note that the units for measuring efficiency are in a sense reciprocal, so sliding to the right actually yields a lower number for EVs.

Comparing Emissions of Gas and Electric Vehicles Blank map of the United States, territories not included Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia West Virginia Wisconsin Wyoming District of Columbia District of Columbia
EV outperforms gas
Gas may outperform EV depending on season
Gas outperforms EV

As you play with the sliders, it becomes clear that the trend favors the EV, and going forwards electric vehicles will be the better choice. Considering most cars average around the 25 mpg mark, electric vehicles are objectively superior in this regard. Though it is easy to move the sliders around to favor a gas vehicle, pay close attention to whether or not the numbers you get seem reasonable!

I am still happy with my 55 mpg hybrid. Living in Texas, I am on par with the electric vehicles around me, and have a 600+ mile range each time I fuel up. Until battery-swapping stations become commonplace (making recharging time irrelevant) I do not see the need to upgrade any time soon. Assuming the greenification of our grid continues, however, I will certainly buy an electric vehicle once my current ride gives up the ghost.

Final Thoughts

GLOBAL WARMING IS NOT YOUR FAULT

It is everyone’s responsibility to minimize their environmental impact whenever possible. Let us not forget, however, that a mere 100 companies are responsible for 70% of global emissions 4. It is they who push the narrative that the climate crisis is your fault. It is they who fight for environmental regulations in one country to save face while belching their poisonous effluvia into the lungs of the voiceless one continent over. It is they who enrich themselves to the detriment of All.

Never lose sight of the truth.


  1. Dabelstein, W., Reglitzky, A., Schütze, A. and Reders, K. (2007). Automotive Fuels. In Ullmann’s Encyclopedia of Industrial Chemistry, (Ed.). https://doi.org/10.1002/14356007.a16_719.pub2 ↩︎

  2. Occupational Exposures in Petroleum Refining; Crude Oil and Major Petroleum Fuels IARC Monographs on the Evaluation of Carcinogenic Risks to Humans Volume 45 ↩︎

  3. Figuring out what fields I actually needed took more work than I expected — what precisely is meant by “net generation”, “utility generation”, and “gross generation”? What are the differences? I don’t want to take any chances or presume and be wrong! Luckily, the EIA maintains a glossary with precise definitions of all terms used on the site. This document also gives an excellent overview of concepts and terms related to electricity generation. ↩︎

  4. CDP. July, 10 2017 ↩︎

Tags