Oil refinery profit margins are driven by the difference between refined product market prices and crude oil costs. This difference is defined as the crack spread. The term is derived from the cracking of crude oil molecules into smaller finished product molecules--like gasoline and diesel.
However, there is not one single crack spread that applies to all refineries. Each refinery produces a different portfolio of finished products refined from different sources of crude oil. Therefore, each refinery or refining company will track the crack spread for their own production.
Because the spread between crude prices and refined products is the main driver of refinery profit margins, futures contracts have been established to allow refining companies to hedge their results. The most common of these is the NYMEX 3:2:1. Trading this contract allows the refining company to account for price swings in the 3 products--crude, unleaded gasoline, and heating oil--in a 3:2:1 ratio.
from Fool article Valero Hooked on Crack Spreads
"3-2-1 crack is an approximation of the profit margin that a refiner earns by turning crude oil into end-use products. Take the price of two barrels of gasoline and one barrel of heating oil, divide by three, subtract this average from the price of a barrel of crude, and there's your crack spread."