Mattel (MAT -0.60%) and Coca-Cola (KO) are both iconic American brands. Mattel, which was founded in 1945, is the toy maker that sells Barbie, Hot Wheels, Fisher-Price, and American Girl toys. Coca-Cola, which was founded in 1886, is the world's largest soda maker and also sells a wide range of noncarbonated drinks.

Both of these stocks might seem like solid long-term investments. But over the past 10 years, Mattel's stock was cut in half as Coca-Cola's stock rallied over 50%. Let's see why the soda maker crushed the toy maker, and if it's still the better buy.

An investor checks a laptop.

Image source: Getty Images.

Why did Mattel's stock stumble?

Between 2012 and 2022, Mattel's annual sales dropped from $6.4 billion to $5.4 billion, representing a negative compound annual growth rate (CAGR) of 2%. The bulk of that decline occurred from 2014 to 2019, when its sales shrank for five consecutive years.

Mattel initially struggled with declining sales of Barbie products, and that slowdown was exacerbated by its loss of Disney's coveted (DIS -0.04%) princess license to Hasbro (HAS -0.77%) in 2016 and the bankruptcy of Toys R Us in 2017.

Mattel eventually revived the Barbie brand, which rejoined Hot Wheels as a high-growth power brand. But that progress was offset by its weaker sales of Fisher-Price, Thomas the Tank Engine & Friends, and American Girl products.

To turn around its business, Mattel suspended its dividend in 2017 and launched an ambitious plan in 2018, to stabilize its growth by restructuring its business. It aimed to expand its Power Brands (Barbie, Hot Wheels, Fisher-Price, Thomas the Tank Engine, and American Girl), launch new product lines, license out its franchises for new movies and media projects, and expand its own first-party e-commerce capabilities to reduce its dependence on third-party retailers.

Mattel also signed new licensing deals with Nintendo, Warner Bros., Comcast's Universal, and WWE, and it pulled Disney back from Hasbro with a new licensing deal in 2022. All of those bold moves, along with a pandemic-induced spike in toy sales, enable Mattel to finally grow in revenue at a CAGR of 6% between 2019 and 2022. Its adjusted earnings before interest, taxes, depreciation, and amortization (EBITDA) also had a CAGR of 29%.

That turnaround was impressive, and the Barbie movie might boost its sales. But for 2023, Mattel expects its revenue to stay flat in constant-currency terms as its adjusted EPS dips 4% to 12%. Inflation can mainly be blamed for that slowdown, since it curbed consumer spending, squeezed its margins, and weakened sales of Fisher-Price products.

Why did Coca-Cola's stock keep rising?

It might initially seem like Coca-Cola suffered a multiyear slowdown like Mattel. On a reported basis, its sales dropped from $48 billion in 2012 to $43 billion in 2022, or a negative CAGR of 1%.

But unlike the situation with Mattel, which struggled with fundamental challenges, Coca-Cola's declining revenue (which mainly shrank from 2012 to 2018) was caused by the refranchising of its bottling operations. That strategic shift enabled the company to spin off most of its U.S. bottlers into independent businesses.

Therefore, a clearer way for investors to gauge Coca-Cola's growth is through its organic sales, which tunes out the noise from those divestments. Its organic sales fell 9% during the pandemic in 2020 due to the closures of restaurants and other dine-in locations, but grew 16% in both 2021 and 2022. It expects 8% to 9% growth in 2023.

Coca-Cola's stable sales might surprise investors who had assumed declining soda consumption worldwide would throttle its long-term growth. But Coca-Cola doesn't just sell its namesake cola and other carbonated drinks. Over the past few decades, it significantly expanded its portfolio by developing and acquiring more brands of fruit juices, teas, sports drinks, bottled water, coffee, and even alcoholic beverages.

It also refreshed its carbonated drinks with sugar-free versions, new flavors, and smaller serving sizes to reach a broader audience of younger and health-conscious consumers.

That expansion enabled Coca-Cola to generate robust earnings growth and plenty of free cash flow for its dividends, which it has raised annually for 61 consecutive years. Its adjusted EPS rose 19% in 2021 and 7% in 2022, and it expects to generate another 5% to 6% growth this year. It currently pays an attractive forward dividend yield of 2.9%.

The better buy: Coca-Cola

Coca-Cola's stable growth and consistent dividends made it more appealing than Mattel over the past decade, and that trend should continue for the foreseeable future.

Mattel trades at 18 times forward earnings, which seems reasonable relative to its growth prospects, but its upside potential could be limited as long as inflation continues to curb consumer spending and compress its margins.

Coca-Cola might seem a bit pricier at 24 times forward earnings, but its stability and evergreen business model justify that higher valuation and make it a more compelling long-term investment than Mattel.