Costco (COST  ) shares were up 2% following the company's fiscal Q1 earnings report which showed it missing analysts' expectations on the top and bottom lines. The company saw some modest improvements on a year-over-year basis, primarily due to passing on price hikes to consumers rather than absorbing the bulk as it had in previous quarters.

Additionally, the company has a positive tailwind in terms of labor market pressures easing and freight prices plummeting in addition to increased consumer spending power with lower gasoline prices. Investors also had a positive reception to the news that the wholesale giant is looking to hike membership fees which comprise the bulk of the company's profits.

YTD, Costco shares are down 14%. Shares are basically flat over the past year, and valuations have compressed to their lowest levels in many years at a forward P/E of 30. Costco could be a big outperformer if the economy slows but inflationary pressures ease as the latter would be an earnings and margins tailwind while the former leads to outperformance in defensive stocks like Costco.

Inside the Numbers

In its fiscal Q1, Costco reported $3.07 in earnings per share which came in short relative to analysts' expectations of $3.11 per share in earnings. Revenue came in at $54.4 billion, missing expectations of $54.6 billion. Overall, this was a 3% gain on the bottom line and an 8% increase on the top line.

Online sales were down by 4% on an annual basis. In total, the company had same-store sales growth of 6%. Shares had been weak during the month due to the company warning about weaker-than-expected sales last month.

However, this did seem to soften the blow from this earnings miss as investors were more focused on the special dividend and membership fee hike. In addition to the challenging macro environment, the biggest factors weighing on results were the strong dollar as about a quarter of the company's revenues are derived from overseas.

Overall, there is little to worry about for longer-term investors. Challenges created by the pandemic and supply chain issues are in the rearview mirror. The next challenge is also significant in the form of a recession, but the company has successfully navigated these in the past. And historically has outperformed in recessions as consumers increase buying in bulk to save money.