By now, you have probably heard about Transcanada's (TRP 0.06%) Keystone XL pipeline. For even the most casual observer of the energy industry, this project has been the spark that has ignited political debates ranging from environmental hazards, emission of greenhouse gasses, and North American energy independence. In Tuesday's speech on climate change, President Barack Obama made a point to talk about Keystone XL and how it will be evaluated:

Allowing the Keystone XL pipeline to be built requires a finding [from the Department of State] that doing so will be in our nations interest ... [which] will be served only if this project does not significantly exacerbate the problem of carbon pollution. The net effects of the pipeline's impact on our climate will be absolutely critical to determining whether this project is allowed to go forward.

There are clear environmental concerns regarding the construction of this pipeline, but the story is so much more than that. To help better understand the entire story of the Keystone XL pipeline, we at the Motley Fool want to give investors a better look at what the Keystone XL means for all parties involved. In this first of seven articles on the Keystone XL, we will take a look at the economic fundamentals for building this pipeline.

Setting the stage: types oil, refining, and U.S. oil imports
The United States is far and away the largest oil processing center in the world. Our total oil refining capacity is at a staggering 17.4 million barrels per day, almost 19% of the world's supply, according to the 2013 BP Statistical Review of World Energy. While the U.S. may be in the middle of a oil and gas boom, the country still imports about 9.5 million barrels of oil per day, and the U.S. Energy Information Administration's recent projections estimate that the U.S. will import no less than 35% of demand all the way out until 2040.

Source: U.S. Energy Information Administration

Even though total imports are going to play a major role in the fate of the U.S. crude market, there is one caveat that makes the story even more complicated -- the types of crude oil involved.  

The black gold breakdown
Crude oil comes in many different forms. To simplify a very complex compound, we measure it using API gravity:

API Gravity Classification Examples
> 31.1° Light Crude  Oil from Southern Louisiana, known as Light Louisiana Sweet 
22.3°-31.1° Medium Crude Oil from West Texas, known as West Texas Sour
< 22.3° Heavy Crude

Heavy oil from Venezuela, Mexico, the Middle East, and Canada

 Source: International Marine Consultancy and American Petroleum Institute. Note, the terms "sweet" and "sour" in the table above refer to the sulfur content in the source crude. 

Today in the United States, the average API gravity for refinery input is between 27 and 33, producing an optimum mix of petroleum products ranging from gasoline and diesel to plastics and home heating oil. Not every oil play in the U.S., or in the world for that matter, will fall in this optimal range, so either separate types of crudes are processed at different times, or they are blended together to produce an ideal product mix.

Mo' oil, mo' problems
This brings us back to the problems for U.S. refineries today. The bulk of the newly discovered oil trapped in shale formations are light, sweet crudes. While these light, sweet crudes have helped us reduce our need for imports, that's only half of the equation – we also need heavy oils to meet that ideal product mix, which simply doesn't exist in America with the economically recoverable resources we have today. There is a possibility that the U.S. has trillions of barrels of heavy oil, but the technology to extract it economically is decades away.

Source: U.S. Energy Information Administration

Keeping the refinery engine fueled
For the foreseeable future, we will need to rely on heavy oil imports to stay within our optimal refinery range. Combined, medium and heavy oil make up about 70% of what we import. Historically, the U.S. has relied on a few specific places for heavy oil: the Middle East, Mexico, Venezuela, and Canada.

Source: U.S. Energy Information Administration, authors calculations. Note, the term mmbpd refers to million barrels per day.

More specifically, the capacity of that heavy oil is felt most directly in the heart of America's refining business, the Gulf Coast. This part of the country can refine about 2.38 million barrels per day. In fact, heavy oil imports to the Gulf Coast are greater than the total imports for any other region in the U.S.

Why this matters to the Keystone XL
The proposed pipeline is designed to carry 830,000 barrels per day of (mostly) heavy crude oil from the oil sands regions of Alberta to either Nederland or Houston, Texas. The project will also have an opportunity to move crude from the Bakken formation in the North Dakota-Montana region. 

Source: Transcanada Investor Relations

I'm sure you have heard plenty of reasons for and against building the pipeline, but the bottom-line reason to build Keystone XL is to save money by importing cheaper Canadian heavy oil instead of oil from other sources. Lots of money.

.

Source: U.S. Energy Information Administration, authors calculations. Note: Saudi Arabian import prices are withheld to avoid disclosure of individual company data, per EIA.

Doing a quick calculation on the back of the napkin, if this price differential were to continue and a completed Keystone XL pipeline were to deliver its maximum capacity of 830,000 barrels per day, U.S. refineries could save about $9.1 billion a year on their crude oil bill. This isn't an exact calculation, and lots of forces could change that difference in price. But ultimately, Keystone XL provides us with more options to buy crude, and more options means suppliers have to compete more on price.

As stated before, though, the U.S. Gulf Coast has heavy oil refining capacity about 2.38 million barrels per day. Right now, the Gulf Coast receives about 90,000 barrels per day of Canadian heavy crude, and for these refiners, that is the problem. U.S.-Canada trans-border oil pipelines are at capacity, and for the most part they are feeding the Rocky Mountain and Midwest regions with crude oil, which can only handle about 500,000 barrels per day of heavy oil. One large BP (BP -0.98%) refinery in the region is refitting itself to run more heavy Canadian crude, but that is about it in terms of gains for the Midwest region. The only realistic pipeline option to expand U.S. consumption of Canadian heavy oil is to pipe it to the Gulf Coast.

While there is certainly room to grow, there is a ceiling as to how much heavy crude the U.S. can take from Canada. Keystone XL's 830,000 barrel per day could gobble up over one-third of Gulf Coast heavy oil demand in one fell swoop, leaving 1.46 million barrels per day of heavy oil refining capacity left provided no new refining capacity comes on line. After that, oil sands will need to go elsewhere.

What a Fool believes
As you can see, there are several driving forces behind the Keystone XL pipeline and it has a lot of moving parts, but there is a clear opportunity in terms of price. Unfortunately, the rabbit hole goes much deeper for this topic. Check back to Fool.com for the debate over the Keystone XL, and join the discussion about what the pipeline means for sectors across the energy space.