To hedge, or not to hedge? That is the question many oil and gas companies ask themselves each and every day. By hedging, or locking in future oil and gas prices, a company is giving up the future upside in exchange for certainty. As you will soon see, for some oil and gas companies, hedging is the life blood that keeps the company going.

As you know, oil and natural gas prices can be very volatile. That volatility can really impact a company's profitability as well as its ability to plan for the future. That's why some companies want absolutely no uncertainty, and will hedge 100% of future production for many years into the future. Others feel that investors want full access to the upside of commodity prices, and won't hedge any production. Both models can make producers look brilliant depending on what commodity prices are doing at that moment.

Companies that hedge over the long-term can end up doing very well. This is really clearly seen when looking at an oil and gas MLP like Legacy Reserves (NASDAQ:LGCY). The following chart does a great job of showing its annual revenues with and without the impact of its hedging program:

Lgcy Hedging

Source: Legacy Reserves Investor Presentation

As you can see, hedging its oil and gas volumes had a negative effect on the company's revenue in 2008, which, if you'll remember, was the year that oil and gas prices really shot higher. However, the company was well protected as that bubble burst, which enabled it to consistently grow its revenue during that period of volatility.

Legacy typically hedges 85% of its production looking out over the next two years, while hedging a declining portion of its production after that. That's well below LINN Energy (NASDAQ:LINE), which will hedge 100% of its production out four to six years. As you can see from the following chart, LINN is well above both its upstream peers like Legacy, as well as C-Corps:

Linn Hedging V Peers

Source: LINN Energy Investor Presentation

Overall, hedging has helped both LINN and Legacy to keep distribution payments to investors stable during the financial crisis when many companies were slashing payouts. That's one reason why it matters much more to these MLP's than it would for an E&P company like Chesapeake Energy (NYSE:CHK). That being said, Chesapeake is very well hedged this year because it needs to ensure its cash flow in order to fund its growth.

Because the company really can't take on the risk of commodity prices collapsing this year, its hedged 78% of its natural gas production, as well as 88% of its oil production. That's locked in its operating cash flow to a range of $5.05 billion to $5.32 billion. Because of its tight financial situation, the company made the decision that certainty is worth more than upside at the moment.

Ultra Petroleum (NASDAQOTH:UPLMQ) also uses hedges to provide certainty to its cash flow. The company has hedged 81.4 billion cubic feet of production through the end of this year. That equates to about half of its production in the next two quarters, and about a quarter of its fourth-quarter production. Ultra is doing this in order to generate the cash flow that's required to meet its capital budget. That will enable the company to drill about 80 wells this year so that it can grow its overall production to between 228 Bcfe and 238 Bcfe, all while staying within the confines of its cash flow. If the company didn't secure its cash flow by hedging, it wouldn't be able to grow as fast if natural gas prices plummet this year.

As you can see, hedging oil and gas production is very important to energy companies. It's even more important to those companies that really need to ensure stable cash flow to either pay investors steady income, or to continue growing. While these companies are giving up the upside, there is something to be said for income certainty. 

Fool contributor Matt DiLallo has no position in any stocks mentioned. The Motley Fool recommends Ultra Petroleum. The Motley Fool owns shares of Ultra Petroleum and has the following options: Long Jan 2014 $20 Calls on Chesapeake Energy, Long Jan 2014 $30 Calls on Chesapeake Energy, Short Jan 2014 $15 Puts on Chesapeake Energy, Long Jan 2014 $30 Calls on Ultra Petroleum, Long Jan 2014 $40 Calls on Ultra Petroleum, and Long Jan 2014 $50 Calls on Ultra Petroleum. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.