Sporting apparel giant Nike (NKE 0.95%) has had a rough year; the Swoosh is one of the worst-performing members of the Dow Jones in 2022, and the stock took another slide lower after reporting earnings for the first quarter of its fiscal 2023 year. It's understandable to see stocks sell off in this market, but why has Nike stumbled so much?

Knowing the answer to that question can help you answer another one: Is Nike worth buying? Or should you be running away as fast as you can? A look into the numbers will underline some short-term challenges, but you might be surprised about the long-term outlook. Time to dive in.

Nike ran too far, too fast

Nike doesn't need some elaborate introduction: The company is the world's leading sports apparel brand; its iconic Swoosh is everywhere, endorsed by many of the world's leading athletes, from Michael Jordan to LeBron James and Cristiano Ronaldo. It's also well-known among investors as not only one of 30 members of the Dow Jones Industrial Average but an all-time winning stock. A $10,000 investment at the company's initial public offering (IPO) would be worth $7.6 million today, even after the stock's large slide.

But picking the right stock is only part of the equation for investment returns; the price you pay also plays a huge role. The market was highly bubbly in early 2021 on the heels of stimulus money that was flowing into the market. You can see below how Nike's price-to-earnings (P/E) ratio soared to more than 80:

NKE PE Ratio Chart

NKE PE Ratio data by YCharts

That's way above where Nike has historically traded; its 10-year median P/E is just over 28. The stock market tends to weigh stocks by their fundamentals over the long term, so if a stock's valuation goes way above or below its long-term norms, there's a pretty good chance it will eventually revert. As you can see above, most of Nike's slide this year was undoing the extreme overvaluation of 2020 to 2021.

Acknowledging short-term troubles

It can take some event to trigger a stock's reversion, like what you see with Nike. It could be an overall downturn in the market, and you've seen that too. But Nike has also had some company-specific troubles as of late. For starters, inflation hurts Nike's profit margins. Gross margin declined 220 basis points in fiscal 2023's Q1 due to increased freight costs.

Additionally, the retail stores that buy Nike products and resell them to consumers are sitting on tons of inventory. Management discussed in the earnings call how supply-chain challenges made it hard to predict when orders would get filled, so retailers ordered a bunch of products, taking the better-safe-than-sorry approach. Consumer spending was strong, and retailers didn't want empty shelf space. But now that inventory has come in, consumer spending is declining as the economic outlook grows increasingly shaky. 

Instead of slowly and painfully dealing with off-schedule inventory, management is ripping off the Band-Aid and aggressively discounting to clear it out and get a clean slate as supply-chain conditions return to normal. Management warned that margins would take a hit this year, but it will allow the company to get things back to normal sooner.

Seizing the opportunity

It's important to distinguish between Nike's broader brand appeal and a short-term hiccup with its inventory. There doesn't appear to be any evidence that Nike tarnished its brand. Sometimes unusual circumstances occur, and a company must make tough decisions to undo the damage. I think it's safe to say that the past few years have been anything but ordinary.

Analysts are calling for a hit to the bottom line this year. Earnings per share (EPS) for fiscal 2023 could drop to $3.60, a slight decline from the $3.75 it posted for fiscal 2022. However, analysts still call for 12% annual EPS growth over the next three to five years, underlining the belief that these inventory problems are temporary.

Nike has grown EPS by an average of 11% annually over the past decade, which means that growth could be slightly picking up the pace moving forward even with a disappointing 2023. The stock is already trading 14% below its median P/E ratio, so long-term investors are looking at a solid buying opportunity today. It's OK if Nike sells off even further; the company's long-term outlook appears intact, which makes it a compelling investment idea for savvy and patient investors.