For almost two years, cost cutting drove earnings improvement. Last quarter, corporate revenues began beating expectations. Both consumer and corporate spending appear to be mending.

That should be good for profits, right? Well, maybe.

It's pretty simple. If revenues grow faster than expenses, profits grow even faster. If expenses grow faster then revenues, margins decline and profit growth is muted. If expenses grow a lot faster than revenues, profits can decline.

Margin declines are already happening. With fourth-quarter reports in from about three-quarters of S&P 500 companies, operating margins dropped from 8.95% in the third quarter to 8.69%. Because the fourth quarter is typically the seasonally strongest -- i.e., the highest revenue and margins -- this is especially concerning.

It wasn't just a couple of big losers behind the sequential margin decline. About one-fourth of companies reported lower margins in the fourth quarter. They included Kraft Foods (NYSE: KFT), Procter & Gamble (NYSE: PG), and Ford Motor (NYSE: F). Revenue and profit beat consensus forecasts for all three companies, typically a positive for a stock. Yet all three stocks got hit.

It's no secret costs are increasing. That's particularly true for gasoline. It is also true of many commodities such as cotton, wheat, and copper. The Consumer Price Index bottomed in May of last year and is on its way back up.

Yet analysts are expecting margins to expand this year. For nonfinancial S&P 500 companies, S&P is forecasting revenue growth of 11% and operating (aka, "before bad stuff") EPS growth of 13%.

Consumer discretionary -- which includes Ford, Walt Disney (NYSE: DIS), McDonald's (NYSE: MCD), and Comcast (Nasdaq: CMCSA) -- and consumer staples -- which includes P&G, Kraft,and Wal-Mart (NYSE: WMT) -- are among the sectors for which EPS are forecast to increase faster than sales. For consumer discretionary, S&P expects revenue growth of 7% and operating EPS growth of 12%. For consumer staples, S&P expects revenue growth of 7% and operating EPS growth of 9%.

Foolish takeaway
Companies may be able to boost EPS growth by burning some of the cash they've been hoarding. But margins have been near record levels and have a history of reverting to normal levels -- then overshooting on the downside. Rising inflation could be the catalyst for such a multiyear mean reversion. Investors should be wary of the risk that inflation could deflate stocks of companies with rising costs and little pricing power.

More on inflation: