How the EV semi emissions calculator works
Before the numbers, the picture. The dirtiest trucking in America is often the shortest: drayage, the port-to-warehouse shuttle that moves a container twenty or fifty miles and comes back for another one. The routes run through the same neighborhoods every day, the trucks idle in the same gate queues, and drayage fleets have historically run the oldest diesels in the industry. If you live beside a port corridor, the exhaust is not an abstraction. It is the air on your street. That is why replacing exactly these trucks with electric ones is the sharpest version of the electric-truck story, and it is the scenario this page prices.
The calculator runs two ledgers at once, because diesel exhaust is really two different problems. The first is CO2, which is global: a ton emitted at the Port of Long Beach warms the planet the same as a ton emitted anywhere. Here the electric truck is better but not innocent, so we count both sides: the tailpipe CO2 the diesel no longer emits, minus the CO2 the grid emits to make the charging electricity. The second ledger is the local one: NOx and fine soot (PM2.5), the pollutants tied to asthma, cardiovascular disease, and shortened lives near freight corridors. These act where they land, and for them the electric truck is not merely better. Its tailpipe number is zero, because there is no tailpipe. Every factor in both ledgers comes from a published source, listed at the bottom, and every default is editable.
The formula
diesel CO2 = (miles ÷ mpg) × 10.18 kg per gallon
electric CO2 = miles × kWh/mile × grid lb CO2 per kWh
net CO2 cut = diesel CO2 − electric CO2
NOx or PM2.5 removed = miles × engine-era grams per mile
The 10.18 kg per gallon is EPA's figure and it is chemistry, not engineering: the carbon in a gallon of diesel becomes that much CO2 no matter how well tuned the engine is. The 6.0 mpg default is NACFE's average for Class 8 regional haul. The 1.7 kWh per mile default is the real-world Tesla Semi figure from NACFE's monitored Run on Less Electric DEPOT event, not the brochure. Grid intensities are EPA eGRID 2023 data. The engine-era grams per mile come from port and corridor measurement studies and are the heart of the page; more on them below.
Worked example
5 electric semis replacing a typical mixed drayage fleet, 175 miles a day, 250 days a year, at 6.0 mpg and 1.7 kWh per mile on the US average grid:
Annual miles = 5 × 175 × 250 = 218,750. The diesel side: 218,750 ÷ 6.0 = 36,458 gallons × 10.18 kg = 371.1 metric tons of tailpipe CO2. The electric side: 218,750 × 1.7 = 371,875 kWh × 0.77 lb per kWh = 129.4 metric tons of grid CO2. Net: 241.7 metric tons of CO2 cut per year, a 65.1% reduction. By EPA's equivalency factors that is like taking 56 passenger cars off the road, the electricity emissions of 50 homes, or 4,029 tree seedlings grown for 10 years.
And the neighborhood ledger: 5,739 lb of NOx and 57.4 lb of exhaust PM2.5 per year that no longer go into the air beside the route, because the electric trucks' tailpipe figure for both is zero. Switch the grid to California, where most real drayage electrification is actually happening, and the CO2 cut climbs to 298.9 tons (80.5%). Switch it to the coal-heavy Midwest grid and the cut shrinks to 162 tons (43.7%) but does not disappear: diesel is simply that carbon-intense per mile. The local air numbers do not move at all, whatever powers the charger.
Why the engine era matters more than anything else on this page
Two federal deadlines carved the diesel fleet into eras, and the differences are not subtle. Model year 2007 effectively mandated the diesel particulate filter (DPF), which cut exhaust soot by more than 90 percent. Model year 2010 brought the NOx standard that made selective catalytic reduction (SCR) standard equipment, and NOx fell by a similar share. A pre-2007 truck has neither. Port measurements put such a truck around 20 grams of NOx per mile in drayage service (the Houston drayage study measured 19 to 28 g per mile in ordinary driving, and more inside the port gates), roughly the per-mile NOx of 667 brand new gasoline cars meeting today's Tier 3 fleet average. A 2007 to 2009 truck has clean soot but old NOx: we use 18 g per mile, because measurements at the Port of Oakland found DPF-only trucks' NOx close to the older group. A 2010-and-newer truck is far cleaner at about 5 g per mile in low-speed drayage duty; that is our reading of ICCT's in-use data (1.1 g per bhp-hr in urban driving, about triple the certification limit, SCR runs cool at creeping speeds) bracketed against the Port of Oakland's measured 69 percent reduction versus older engines. Three tiers is as fine as we can honestly slice it: published per-mile measurements do not support ten, and we would rather use fewer numbers we can defend than more numbers we invented.
The default, "typical mixed drayage fleet," is our own disclosed blend: half 2010-and-newer, three tenths 2007 to 2009, two tenths pre-2007, which works out to 11.9 g of NOx and 0.119 g of PM2.5 per mile. That is an editorial estimate of a legacy-leaning national fleet, not a measured figure; California ports now require 2010-or-newer engines, so if your scenario is a CARB-compliant fleet, pick the 2010+ tier and the savings will honestly shrink. That is the point of the select: the answer depends enormously on which diesel is being replaced, and this page would rather show you that than hide it in an average.
What this page deliberately leaves out
An honest estimator names its edges. Brake and tire particles are not exhaust and do not go away with the tailpipe; the brake share genuinely shrinks because regenerative braking slows the truck with the motor instead of the pads (measured reductions in brake wear PM2.5 run roughly 64 to 95 percent), but tire wear remains and a heavy battery does not help it. Upstream fuel emissions are excluded on both sides in one direction that favors diesel: refining and hauling diesel adds roughly 20 percent to its ledger (the well-to-tank share in GREET-style analyses), so the net CO2 cut shown here is conservative. Grid intensity varies by region and by hour, and overnight depot charging does not always match the annual average we use; the custom field is there for a reason. Battery manufacturing is a real one-time carbon cost outside this per-mile page, paid back fastest by exactly the high-mileage, old-diesel, clean-grid scenario this page describes. And noise: an electric semi is dramatically quieter than a diesel at drayage speeds, which portside neighborhoods notice immediately, and we make no attempt to put a number on it. Quiet is real; we just will not pretend to quantify it.