Refining has long been a low-margin business, not for the faint of heart. The difference between what refiners pay for input and what they get for output, known as the crack spread, is traded on major oil markets. It sometimes goes negative, meaning refiners lose money on every barrel.

In the 1970s, with widespread worries over fuel supplies, US refiners overbuilt capacity. Since the 1980s, refiners have sold, merged, and shut down excess capacity, and upgraded capabilities, resulting in fewer refiners but more capacity actually utilized and better economics overall.

Refineries in the US interior, like the Midwest and Mountain West, process oil from their own regions and Canada, and sell the resulting products locally, so their economics are peculiar to their locations. Refineries on the coasts tend to be part of world markets, and that has both advantages and disadvantages.

Refined Product Exports Rising, What’s Next?

One recent positive for US refiners has been increasing exports of diesel fuel to Latin America.

For years, US refiners focused on the gasoline demanded by the American public. But stricter mileage standards mean US gasoline consumption has been dropping. Now, US refiners with world market access are “optimizing value” by exporting diesel, Stewart said.

The US Energy Information Administration reports that the US became a net exporter of refined products in 2011 for the first time in more than 60 years.

That also means US refineries may not produce more gasoline even as domestic prices climb because refiners see profits in refinery runs for a different slate of products.

The disadvantage of world market exposure is illustrated by the threatened shutdown of three refining complexes around Philadelphia, PA. They have been losing money because their crude feedstocks were imported. Competing Midwestern refineries had access to cheaper crudes from North Dakota and Canada, discounted because there’s insufficient pipeline capacity to take that oil south to the Gulf and global markets.

But the Philadelphia refineries supply 60% of the very low sulfur diesel fuel increasingly being required in New York and New England through a major regional pipeline, and their shutdown threatened shortages and price spikes in that region.

That old law “is just crazy,” – Stewart

The largest of those refineries, the Philadelphia complex, is now being revamped by investors to take railed-in Midwestern crude. With reduced costs for feedstock and operations, investors hope to make it competitive again.

Worldwide, while there’s overcapacity among refineries in aggregate, refineries frequently serve local markets so refinery economic decisions often have significant local impacts.

In Europe, older refineries have shut due to shrinking overall demand for refined products, leaving a summer 2012 scramble for diesel fuel.

Shutdowns are leading to worries about increasing import dependence in places like Australia, where three of eight refineries have been shut in less than 10 years.

Refineries play a role in the sanctions levied in 2012 against Iran. The sanctions limit refiners both in buying Iran’s crude and in exporting refined products there. The nation doesn’t have sufficient refining capacity to meet burgeoning domestic demand, and so has both crude surplus and fuel shortages.

Moreover, refineries can alter world oil supply. Saudi Arabia has been expanding its refining capacity to meet the needs of its growing population, including hydrocrackers and cokers to handle its heavy crudes.

Stewart said Saudi Arabia is viewed as likely, in coming years, to retain those crudes to minimize costs for its own refining and export more of its lighter crudes instead, affecting other refiners’ economics.

A similar calculation has recently led several experts to urge changing US law that bars export of crudes, so refiners can sell lighter stocks overseas and buy cheaper ones.

Read additional Breaking Energy coverage regarding the prospect of US oil and gas exports here.

That old law “is just crazy,” said Stewart. “Any refiner should have the option to minimize the cost of feedstocks, and US refiners do not.”

This is the second article in a two-part Breaking Energy series on the refining business, read Part One here.