Diesel and electric locomotives power different rail networks for different reasons

Diesel locomotives burn fuel to turn an engine, which powers a generator or hydraulic system that moves the wheels. Electric locomotives draw power from overhead wires or a third rail and convert that electricity into motion. Neither is universally better — railroads choose based on the routes they run, the cargo they haul, and the infrastructure already in place. Freight lines in rural areas almost always use diesel. Urban transit systems and some passenger routes use electric. Understanding the difference helps explain why you see different locomotives on different tracks.

Key Takeaways

  • Diesel locomotives carry their own fuel and can operate anywhere there are tracks, making them ideal for freight lines that cross remote areas.
  • Electric locomotives need overhead wires or a third rail and cannot move beyond the electrified section, but they produce zero emissions at the point of use.
  • Diesel engines are cheaper to buy upfront and require less infrastructure investment, which is why most freight railroads use them.
  • Electric systems cost more to install but are cheaper to operate per mile and produce no exhaust, which is why cities and commuter rail prefer them.
  • A single railroad may use both types on different routes depending on distance, terrain, and whether the line is already wired for electricity.

How diesel locomotives generate power

A diesel locomotive contains a large diesel engine — typically 12 to 16 cylinders — that burns fuel much like a truck engine, but much larger. That engine does not directly turn the wheels. Instead, it powers either a generator (in older locomotives) or an alternator (in newer ones), which produces electricity. That electricity runs electric motors connected to the wheels. This setup is called diesel-electric, and it is the standard on freight railroads across North America.

The reason railroads use this indirect system is efficiency. A diesel engine runs best at a steady speed. If the wheels were mechanically connected to the engine, the locomotive would have to shift gears like a truck, which wastes fuel and wears parts. By using electricity as the middleman, the engine can run at its optimal speed while the electric motors adjust power to the wheels smoothly, whether the train is starting from a stop or cruising at 60 miles per hour.

Diesel locomotives carry fuel in large tanks and can run for 400 to 500 miles before refueling. A freight train might refuel at a yard in the middle of its route, but the locomotive itself is self-contained — it needs no infrastructure beyond a fuel depot.

How electric locomotives draw and use power

An electric locomotive has no engine. Instead, it has a pantograph — an arm on the roof that reaches up and touches an overhead wire carrying high-voltage electricity — or a shoe that slides along a third rail carrying electricity at ground level. The locomotive draws power directly from that source and feeds it through transformers and power electronics to electric motors on the wheels.

Because the power comes from outside the locomotive, electric trains can be lighter and simpler than diesel locomotives. They produce no exhaust at the point of use, which is why cities and transit agencies prefer them for subways, light rail, and commuter trains. The electricity itself may come from coal, natural gas, nuclear, or renewable sources — that depends on the power grid — but the locomotive itself is zero-emission.

The catch is infrastructure. Every mile of track must have either overhead wires or a third rail, and that costs millions of dollars to install and maintain. An electric locomotive cannot leave the electrified section; if the power line ends, the train stops. This is why electric systems work well on fixed urban routes where trains run the same path every day, but not on freight lines that need to reach remote loading facilities.

Why freight railroads use diesel almost exclusively

Freight railroads operate across hundreds or thousands of miles, often through sparsely populated areas where electrifying every track would be prohibitively expensive. A single freight line might connect a coal mine in Wyoming to a port in California — a route that passes through deserts, mountains, and small towns. Stringing overhead wires across that distance would cost billions and serve only a handful of trains per day.

Diesel locomotives are also cheaper to buy. A new diesel-electric freight locomotive costs roughly $1 million to $2 million. The upfront cost is lower, and the railroad does not have to invest in power infrastructure. Diesel fuel is widely available at rail yards, and the locomotives are reliable and proven over decades of use.

The trade-off is fuel cost and emissions. Diesel locomotives burn thousands of gallons per day on long hauls and produce carbon dioxide and other emissions. But for a railroad moving grain or containers across a continent, the economics favor diesel. The infrastructure is already there, the locomotives are proven, and the fuel is available everywhere.

Why urban and commuter rail systems use electric

Cities and commuter rail agencies operate on fixed routes, often with frequent stops and high passenger volume. An electric system makes sense because the same tracks are used hundreds of times per day, so the cost of electrification spreads across many trips. A commuter rail line running 200 trains per day over 50 miles justifies the expense of overhead wires.

Electric locomotives also accelerate and brake more smoothly than diesel, which improves passenger comfort. They are quieter, produce no exhaust in the station or tunnel, and can be controlled more precisely. For a subway system where trains stop every mile or two, electric power is the standard.

The downside is that the system is fixed. If a transit agency wants to extend a line, it must install new wires or rails, which takes time and money. If a line is damaged or power is cut, trains cannot move. But for the high-frequency, predictable routes that cities run, those constraints are acceptable.

Hybrid and newer locomotive technologies

Some railroads are experimenting with battery-electric locomotives that store power in large batteries and can run for 50 to 100 miles without overhead wires. These are useful for short-haul freight or yard switching where trains do not need to travel far. A battery locomotive can move cars around a rail yard or haul freight to a nearby facility, then return to a charging station.

There are also hybrid locomotives that use both diesel and battery power, switching between them depending on the task. These are still uncommon and expensive, but they may become more widespread as battery technology improves and environmental regulations tighten.

Hydrogen fuel cell locomotives are being tested in Europe and may eventually reach North America, but they are still in early stages. The technology is not yet cost-competitive with diesel or electric, and the infrastructure to produce and distribute hydrogen fuel does not exist at rail yards.

Comparing diesel and electric locomotives at a glance

FeatureDiesel-ElectricElectric
Upfront cost$1–2 million per locomotive$2–4 million per locomotive (plus infrastructure)
Infrastructure requiredFuel depots onlyOverhead wires or third rail
Range400–500 miles per tankUnlimited, but confined to electrified track
Operating cost per mileHigher (fuel-dependent)Lower (electricity cheaper than diesel)
Emissions at point of useYes (CO2, NOx, particulates)None
Best forLong-distance freight, remote routesUrban transit, commuter rail, fixed routes
Acceleration and controlGood, but less smooth than electricSmooth and precise

Frequently Asked Questions

Can a diesel locomotive run on electric tracks?

No. A diesel locomotive has no pantograph or shoe to draw power from overhead wires or a third rail. It is built to carry and burn its own fuel. An electric locomotive cannot run without the power source. The two systems are separate.

Why don't all trains use electric power if it is cleaner?

Electrifying thousands of miles of freight track would cost tens of billions of dollars and take decades. Freight railroads operate across remote areas where the cost cannot be justified by the number of trains using the line. Diesel is cheaper upfront and works everywhere tracks exist.

Do electric trains produce any emissions?

The locomotive itself produces zero emissions. However, the electricity powering it comes from a power plant, which may burn coal, natural gas, or other fuels. If the grid is powered by renewables or nuclear, the train is truly zero-emission. If the grid is coal-heavy, the emissions are just produced elsewhere.

How much does it cost to electrify a railroad line?

Costs vary widely depending on terrain, distance, and whether the line already has some infrastructure. A rough estimate is $1 million to $3 million per mile for overhead wires and supporting equipment. A 100-mile line could cost $100 million to $300 million before buying a single locomotive.

Are diesel locomotives being phased out?

Not yet. Freight railroads have no plans to replace their diesel fleets in the near term. Some transit agencies are ordering more electric trains, and a few are testing battery-electric locomotives for short routes. But diesel will remain the standard for freight for the foreseeable future because the economics and infrastructure favor it.