Target (TGT 1.28%) made it successfully through the worst of times: The early stages of the pandemic. The company's sales grew more in 2020 than they did in the previous 11 years combined. Sales rose by $15 billion. Its digital platform and contactless delivery services led the gains, at times climbing in the triple digits. Even as business returned to normal in the later stages of the pandemic, Target's earnings wowed investors.

And then came the first quarter of this year. Target, like other retail peers, is facing the challenge of inflation. After Target's earnings report this week, the shares lost nearly 25% in one trading session. As a result, the stock is trading at only 11 times forward earnings estimates. That's compared to more than 20 just six months ago. Considering all of this, why buy this undervalued stock? Let's find out.

Two people looking at smartphone.

Image source: Getty Images.

Higher transportation costs

First, a bit of detail about the first quarter. We'll start with the bad news. And that's the fact that higher transportation costs and a shift in consumer spending habits weighed on gross margin. Target said freight and general transportation costs were "hundreds of millions of dollars higher than our already elevated expectations." That's due to record high fuel prices and high costs across the global shipping market.

As for consumer buying trends, shoppers bought fewer items in categories such as home electronics and sporting goods. Even worse, unsold items in these categories are often bulky -- so Target invested in temporary storage space. And finally, the company marked down certain items to clear inventory at the end of the season.

These headwinds hurt margins and profit. Target reported an operating income margin rate of 5.3%. That's lower than the company's operating margin of 9.8% in the same period last year. And it's lower than the goal for 8% or higher over the long term. Gross margin narrowed to 25.7% from 30% last year. GAAP earnings per share shrank about 48% to $2.16.

With the bad news out of the way, let's move on to the good news. And that's the fact that these problems are temporary. Right now, Target is primarily suffering from the external factor of inflation -- just like other retailers. This external factor is also weighing on shoppers themselves. So, they may not buy as many non-essential items.

Keeping the customer coming back

Meanwhile, Target's wide array of essential items such as grocery and household goods is likely to keep the consumer coming back. The company said food and beverage, beauty, and essentials led sales growth in the first quarter. And overall, Target reported a 3.3% increase in total comparable sales.

Target has kept prices within the range its customers expect in spite of inflationary pressures. Though this hurts profit in the near term, this decision to stick with low prices is a smart one. At the same time, the company continues to invest in elements that have been driving growth, such as its same-day delivery and pickup services.

Target aims to revamp 200 stores this year to better support those same-day services. The idea is to add capacity for these orders and even elements like walk-in coolers so workers can fulfill grocery orders. The company also plans to open more sortation centers. These boost speed of package delivery and cut down on delivery costs. All of these efforts should help Target emerge successfully from this rough period.

As a long-term investor, it's crucial to consider a company's future prospects. Yes, Target's facing some pretty big headwinds today. But as I said earlier, these are external elements and they're temporary. At the same time, Target is managing to keep customers happy and expand in areas that will drive future growth. Today, we're looking at a few difficult chapters in a great long-term story. And that's why, at the current price, it's a good idea to pick up shares of Target before everyone else does.