The Coca-Cola Co (KO -0.14%) and Pepsico (PEP 0.33%) stock are both slumping this week after posting first-quarter earnings. It's a familiar theme: Both companies actually beat earnings estimates but still posted declining revenue in part because of the stronger dollar. 

PepsiCo reported earnings Monday morning and, at the time of this writing, shares were down 3%. Pepsi posted a 3% increase in beverage sales volume -- its best in three years -- and a 3% increase in sales from its North American snacks division. Organic revenue (adjusted for currency affects) was up 3.5%, but reported revenue was down 3% because of the stronger dollar. 

Coca-Cola saw its stock fall 5% on Wednesday after reporting earnings before the market opened that showed organic revenues were up 2% but reported sales down 4%. The market continues to be concerned with flat growth in soda volume, the company's main business. Despite efforts to diversify away from fizzy drinks, the company's fate will still be closely tied to the success of Coca-Cola brand sales.

Still, there's a bigger problem for Coke and Pepsi investors than the strong dollar and slow sales growth: valuation. As the broader market has become more volatile, investors have sought protection in defensive, dividend-paying stocks like Coca-Cola and Pepsi. Both are Dividend Aristocrats, meaning they've increased their dividends each year for at least 25 years in a row, and their businesses -- food and beverages -- are mostly unaffected by macroeconomic events like recessions.

Coke's dividend yields just over 3% at current prices, while Pepsi's dividend yield sits around 2.7%. But the payout ratios -- or the percentage of income that goes to paying dividends -- of the two stocks have gotten squeezed in recent years. Coke's payout ratio now stands at 83%, while Pepsi's is at 76%. Which means the companies will not be able to continue to hike dividends by 7% or so a year without a corresponding increase in earnings growth.  

As you can see from the chart below, both beverage giants have outperformed the S&P 500 over the past year.

KO Chart

KO and PEP data by YCharts.

Both stocks have also gained steadily over a longer time frame despite the headwinds discussed above, and they now carry P/E ratios near 30 (the ratio of the price per share to earnings per share) which is higher than at any other time over the last 10 years. The current S&P 500 P/E ratio is around 24.

KO P/E Ratio (TTM) Chart

KO P/E Ratio (TTM) data by YCharts.

The P/E is the most commonly used measurement to assess the value of a stock. As it increases, expectations for growth tend to move higher, as well as chances of a sharp pullback.  As you can see, the two stocks' valuations have increased substantially over the last five years, especially for Pepsi, whose valuation has nearly doubled in that time. 

Coke and Pepsi have continued to increase their currency-neutral earnings per share through share buybacks and cost cuts in addition to a modest increase in organic sales. Pepsi reported core constant currency EPS up 11% in its most recent quarter, while Coca-Cola said its adjusted currency neutral EPS was up 9% as lower commodity costs also favored both companies.

Pepsi has been trimming expenses for several years with job cuts and sustainability initiatives. It has also targeted $5 billion in productivity gains by 2019, a goal CEO Indra Nooyi says is still within reach. Coke, meanwhile, has been selling off plants and making other moves in an attempt to trim costs by $3 billion. It hopes slimming down and focusing on brand and marketing will help drive sales and profits.

The cost-cutting for both companies has been effective, but efficiency has its limits. Eventually, the two beverage giants will need to deliver top-line growth of greater than 2% to 3%, or the stock picture will look much less appealing. Investors are counting on the steady dividend hikes to continue, slow growth and ballooning valuations only make that more difficult.

Coke's and Pepsi's valuations can't keep increasing forever. Eventually, profits will have to catch up, or the stalwarts could see a pullback.