No company enjoys a recession. Sales, profits, and bonuses fall, and companies lay off employees.

But for some companies, a recession may end up being one of the best things that could happen to them.

The headlines are dire, and for good reason. But even amid all the bad news, there's a simple fact that keeps being overlooked: Certain companies will increase the value of their franchises considerably in a recession.

But it's not every company that can turn a recession to its advantage. The ones that can are leaders in their industries -- companies with strong brands, higher margins, and prudent levels of debt.

How? Three ways:

  • Competitors go out of business.
  • Companies increase their earnings per share through share repurchases or acquisitions at bargain prices.
  • Continued internal investment leads to increased market share and productivity gains.

1) Becoming king of the world
The most direct way a company can benefit from a recession is pretty simple: Competitors go bust. Best Buy will probably benefit from Circuit City's liquidation, and Bed Bath & Beyond (Nasdaq: BBBY) will benefit from not having Linens 'n Things as a pesky competitor.

Likewise, if any of the big three automakers go under, removal of that supply from the market should increase demand for competitors' cars. 

2) Buying up value
Share repurchases and acquisitions are another way value can be created. In a recession, asset values typically fall to historically low levels. A company with a strong cash position can scoop up its own shares or make acquisitions for very low prices.

This is beneficial because buying shares at low prices reduces shares outstanding. The same earnings over fewer shares equal higher earnings per share -- and, theoretically, a higher stock price.

For example, The Washington Post (NYSE: WPO) generated a mind-boggling amount of value for its shareholders in the 1970s when it (at Warren Buffett's suggestion) repurchased vast quantities of its shares at prices well below what it was worth.  

Similarly, buying a business at a depressed price can add to a company's earnings per share, and the lower prices means there is more cash for shareholders -- and all of that means benefits down the road.

That's what Berkshire Hathaway's (NYSE: BRK-B) MidAmerican Energy was trying to do when it agreed to buy Constellation Energy (NYSE: CEG) when the latter was having liquidity issues. MidAmerican agreed to buy the whole company for the bargain price of $4.7 billion, but the deal fell through when Constellation found someone willing to pay $4.5 billion for half of its nuclear power business.

Even though it didn't end up acquiring a quality asset on the cheap, Berkshire shareholders should be quite happy: MidAmerican stands to earn over $1 billion on the $1 billion it initially lent to Constellation.

Having the flexibility to invest in one's own shares and those of distressed companies can give a company quite an edge.

3) Internal investment
All businesses need to continually invest in themselves in order to improve. This is because investments in areas like research & development and productivity initiatives lead to higher sales and lower costs.

Yet, in a downturn, less-well-off companies are forced to put off these expenditures because the more pressing need is to keep the business profitable. But companies with high operating margins and strong cash flows can continue to invest in themselves when times are bad and, therefore, have opportunities to gain on their weaker competitors.

You can see this in the automotive industry. From 2002 to 2006, Toyota's (NYSE: TM) operating margin ranged from 7% to 10%, whereas both Ford's (NYSE: F) and General Motors' (NYSE: GM) ranged from negative 5% to 3%. Toyota's margins were higher because it invested heavily in automated production systems and lean manufacturing initiatives over many years and, as a result, was much better positioned to weather the current crisis than its American competitors.

Investing in yourself -- especially when your competitors can't -- usually leads to a payoff down the road.

Stick with the best
Even recessions can be blessings in disguise for strong, well-run businesses -- but it takes some time for these blessings to become apparent. And that's why it's important to identify now the companies that will likely enjoy these advantages going forward.

At Motley Fool Inside Value, we're on the hunt for companies that are increasing their value even in the midst of this recession. If you'd like to see what we're finding, take a free, 30-day guest pass to get all of our recommendations, including our five best ideas for new money now, as well as a discounted cash flow calculator you can use to evaluate companies on your own. Just click here to get started -- there's no obligation to subscribe.

Fool analyst Andrew Sullivan does not own any of the shares mentioned. Berkshire Hathaway, Best Buy, and Bed Bath & Beyond are Motley Fool Inside Value and Stock Advisor picks. The Motley Fool owns shares of Berkshire Hathaway, Best Buy, and Bed Bath & Beyond. The Motley Fool has a disclosure policy.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.