Coking is a refinery unit operation that upgrades material called bottoms from the atmospheric or vacuum distillation column into higher-value products and, as the name implies, produces petroleum coke—a coal-like material. Exports of petroleum coke accounted for about 19% of the nation's finished petroleum product exports through October 2012 with most going to China and other Asian countries.

Petroleum coke has uses in the electric power and industrial sectors, as fuel inputs or a manufacturing raw material used to produce electrodes for the steel and aluminum industries. In 2011, the refining industry supplied 132 million barrels of petroleum coke with most of it subsequently consumed as fuel.

Two types of coking processes exist—delayed coking and fluid coking. Both are physical processes that occur at pressures slightly higher than atmospheric and at temperatures greater than 900oF that thermally crack the feedstock into products such as naphtha and distillate, leaving behind petroleum coke. Depending on the coking operation temperatures and length of coking times, petroleum coke is either sold as fuel-grade petroleum coke or undergoes an additional heating or calcining process to produce anode-grade petroleum coke.

With delayed coking, two or more large reactors, called coke drums, are used to hold, or delay, the heated feedstock while the cracking takes place. Coke is deposited in the coke drum as a solid. This solid coke builds up in the coke drum and is removed by hydraulically cutting the coke using water. In order to facilitate the removal of the coke, the hot feed is diverted from one coke drum to another, alternating the drums between coke removal and the cracking part of the process. With fluid coking, the feed is charged to a heated reactor, the cracking takes place, and the formed coke is transferred to a heater as a fluidized solid where some of it is burned to provide the heat necessary for the cracking process. The remaining coke is collected to be sold.

Like other secondary processing units, coking can play an important role in refinery economics depending on the type and cost of the crude oil run at a refinery. As the quality of crude oil inputs to a refinery declines, coupled with greater demands for transportation fuels, coking operations will serve to meet transportation fuel demands and also produce increasing quantities of fuel-grade and anode-grade or needle petroleum coke.