Starbucks (SBUX 1.07%) and McDonald's (MCD 0.10%) each had good news for investors in their latest earnings reports. The late October announcement from McDonald's showed strong customer traffic trends as shoppers continued to dine out at fast-food restaurants. Likewise, Starbucks' sales hit a record in the selling period that ended in early October.

With that in mind, let's see which stock looks like the better investment heading toward 2023.

McDonald's is growing

McDonald's wins the growth matchup. Comparable-store sales rose 10% this past quarter, while Starbucks expanded at a 7% rate globally. The burger giant also achieved higher customer traffic in each of its selling geographies. Starbucks, meanwhile, had to rely on increased prices to offset a 1% traffic decline.

McDonald's also boasts the stronger finances. Sure, profitability is declining right now thanks to rising costs. Operating profit margin dropped from the near 50% rate the company set a year ago, but the current 39% is far ahead of Starbucks' 19%. "We are operating from a position of competitive strength," McDonald's CEO Chris Kempczinski said in a press release.

Investors who prioritize cash flow will love Mickey D's stock, too. The company converts nearly all of its earnings into free cash flow each year, helping the company buy back stock and pay a dividend that's been growing for decades. Starbucks suspended its repurchase program in early April to free up cash for investments into the business.

Why buy Starbucks

Starbucks might be on the cusp of a lucrative operating rebound, though. The chain has seen accelerating demand in recent weeks, management said, thanks to more aggressive spending in areas like employee training, store upgrades, and the mobile ordering platform. Comps this past quarter were up 11% in the U.S. market compared to 9% in the previous quarter.

Starbucks' shares are less expensive, too. The stock is valued at 3.3 times sales right now after trading at nearly 5 times sales in early 2022. McDonald's valuation is close to its high for the year, meanwhile, at nearly 9 times annual sales.

The story is similar when you look at price-to-earnings multiples. An investor can own Starbucks for roughly 26 times the past year's earnings but will have to pay over 34 times earnings for McDonald's shares.

The better buy

That valuation gap would likely translate into better returns for Starbucks stock owners from here. But that bullish thesis comes with a big caveat.

The coffee giant is responding to major consumer demand shifts as customers prioritize things like to-go and drive-thru service, especially in rural areas. These are niches that Starbucks hasn't traditionally dominated. It is an open question as to whether the chain can enjoy pricing power and market strength in these arenas.

McDonald's, on the other hand, has demonstrated its ability to grow sales through a wide range of selling conditions. And it already maintains one of the most efficient drive-thru platforms on the market.

Restaurant stock investors who are comfortable with risk might prefer Starbucks stock today, with the expectation of improving operating trends ahead. If you like less volatility, and don't mind paying a premium, then McDonald's shares look attractive. The fast-food giant simply needs to continue capitalizing on its competitive assets -- as it has for decades -- to deliver solid investor returns.