What Is an Oil Refinery and How Does It Work?

An oil refinery is an industrial facility that transforms crude oil into usable products like gasoline, diesel, jet fuel, and heating oil. Crude oil straight from the ground is a complex mix of thousands of different hydrocarbon molecules, and it has almost no practical use in that raw form. A refinery separates, converts, and purifies those molecules into the fuels and materials that power transportation, heat homes, and serve as building blocks for plastics and chemicals.

How Crude Oil Gets Separated

The core process in every refinery is fractional distillation. Crude oil is first piped through furnaces and heated to extremely high temperatures. The resulting mix of liquids and vapors flows into a tall distillation tower, sometimes called a distillation column, where the different components naturally separate based on their boiling points.

The lightest molecules, like gasoline and liquefied gases, vaporize and rise to the top of the tower, where they cool and condense back into liquids. Medium-weight liquids, including kerosene and jet fuel, collect in the middle. Heavier liquids called gas oils settle lower down, and the very heaviest fractions, with the highest boiling points, sink to the bottom. Think of it like a vertical sorting machine: light stuff floats up, heavy stuff drops down. Every refinery has at least one atmospheric distillation unit. More complex facilities add vacuum distillation units that operate at lower pressures to further separate the heavy bottom fractions.

What Comes Out of a Single Barrel

A standard barrel of crude oil holds 42 gallons, but U.S. refineries actually produced about 45 gallons of refined products per barrel in 2023. That extra volume, roughly a 6.3% processing gain, comes from chemical reactions that rearrange molecules and sometimes add hydrogen, causing the final products to take up slightly more space than the original crude.

Here’s how those 45 gallons break down on average:

  • Gasoline: about 19.6 gallons, nearly half the barrel
  • Diesel and heating oil: about 12.5 gallons, roughly 30%
  • Jet fuel: about 4.4 gallons, around 10%
  • Other products: the remainder goes to things like liquefied petroleum gases, asphalt, petrochemical feedstocks, and lubricants

Gasoline dominates because U.S. refineries are specifically configured to maximize it. Refineries in other countries may produce a different mix depending on local demand.

Breaking Big Molecules Into Smaller Ones

Distillation alone doesn’t produce enough gasoline or diesel to meet demand. A large share of what comes out of a distillation tower is heavy gas oil, which isn’t very useful on its own. That’s where chemical conversion comes in.

The most important conversion process is fluid catalytic cracking (FCC). Unlike distillation, which physically sorts molecules by weight, cracking is a chemical reaction. It uses intense heat and a powdery catalyst to snap large, heavy hydrocarbon molecules into smaller, lighter ones. Those smaller molecules become gasoline, diesel, and valuable gases like butane and propane. Without cracking, refineries would produce far less gasoline and far more heavy, low-value residue.

Improving Fuel Quality

Not all molecules of the right size make good fuel. Gasoline performance depends heavily on octane rating, and the raw naphtha that comes off a distillation column has a low octane number. A process called catalytic reforming fixes this by reshaping straight-chain hydrocarbon molecules into ring-shaped (cyclic) compounds that burn more efficiently in engines. These restructured molecules have a much higher octane rating, which is what allows refineries to produce high-octane, lead-free gasoline.

Another critical quality step is removing sulfur. Sulfur in fuel creates sulfur dioxide when burned, which contributes to acid rain and respiratory problems. Regulations worldwide now limit sulfur in gasoline and diesel to as low as 10 parts per million in some regions. Refineries use a process called hydrotreating, where hydrogen reacts with sulfur compounds in the fuel under high pressure, pulling the sulfur out. This is one of the most widespread processes in modern refining, applied to nearly every fuel stream before it leaves the facility.

Handling Sulfur and Emissions

All that sulfur removed from fuels has to go somewhere. Refineries capture it using the Claus process, which converts hydrogen sulfide gas into solid elemental sulfur. A basic Claus unit recovers 92 to 97% of the sulfur in its feed stream. Adding a tailgas treatment unit pushes recovery to 99 to 99.9%. The recovered sulfur is actually a commodity: it gets sold for use in fertilizers, chemicals, and other industrial applications.

The small amount of sulfur that isn’t captured ends up in exhaust gases. Refineries manage this through thermal incinerators that convert remaining sulfur compounds into sulfur dioxide, then scrubbing systems that remove the sulfur dioxide before it reaches the atmosphere. These layered controls are a major reason modern refineries emit far less sulfur than older facilities did.

Simple vs. Complex Refineries

Not all refineries are built the same. A measure called the Nelson Complexity Index, developed in the 1960s, ranks refineries by how much processing equipment they have beyond a basic distillation column. Distillation gets a baseline score of 1, and every additional unit (crackers, reformers, hydrotreaters) adds to the score based on its cost and capability.

The simplest refineries, called topping refineries, have nothing but a distillation column. They can separate crude oil into its basic fractions but can’t convert heavy products into lighter ones or clean up fuel quality. These facilities produce a limited, lower-value product slate. The most complex refineries layer on cracking units, reformers, hydrotreaters, and coking units that can squeeze value out of even the heaviest residue. A higher complexity score means a refinery can process cheaper, lower-quality crude oil and still turn it into premium fuels.

The Shift Toward Renewable Fuels

Some traditional petroleum refineries are being converted to process biological feedstocks like vegetable oils, animal fats, and used cooking oil into renewable diesel and sustainable aviation fuel. The core chemistry is similar enough that existing equipment, particularly hydrotreating reactors and separation towers, can be repurposed rather than built from scratch.

The conversion is still substantial. Facilities typically need to shut down crude oil processing equipment, install new pretreatment units to handle bio-feedstocks, and often build or expand hydrogen generation capacity (renewable fuel production tends to require more hydrogen). Storage tanks and loading racks get repurposed for different materials. New wastewater treatment and emissions controls may be needed, partly because renewable feedstocks can have noticeable odors that petroleum crude doesn’t. The regulatory classification of the facility often changes entirely, shifting from a petroleum refinery designation to a chemical processing one. Several refineries in California have already completed or begun this transition.