It's been a rough month for retailer Target (TGT 1.28%). The stock has been down almost 40%, primarily due to its recent earnings report. The company is dealing with surging costs related to freight, supply-chain troubles, and increased wages and headcount. The market is volatile right now, so investors are scared and not giving companies the benefit of the doubt.

But this might be shortsighted, and Target's recent decline could be an excellent opportunity for patient investors to buy the dip. Here's why it makes sense.

Person shopping happily at a retail store.

Image source: Getty Images.

Taking a closer look at earnings

Target's second-quarter 2022 earnings report tells two tales. First, the company saw a tremendous hit to its profits. Operating income, the profits from running the company's day-to-day operations, fell 43% year over year to $1.3 billion. 

Management cited a shift in customer spending away from discretionary products, leading to higher-than-anticipated markdowns. In other words, rising gas and food prices are squeezing wallets, leaving less money for things people want but don't need. Additionally, the company is working through rising costs on freight, supply-chain disruptions, and increased wages for workers.

A dramatic decline in operating profits is understandably shocking to investors, but don't let it distract you from the rest of the quarter. For example, Target is still attracting shoppers; the company beat analysts' revenue estimates for the quarter. Comparable store sales grew 3.3% year over year in Q2 2022, and digital sales grew more than 260%, signaling solid momentum in Target's strategic plan to expand its e-commerce business.

Management will need to improve profitability in future quarters. Still, long-term investors should like the company's continued sales and e-commerce growth amid this backdrop of a weakened consumer.

Strong, long-term fundamentals

Past results don't guarantee future success, but they can give investors a sense of management's track record. Target has been around the block once or twice; the stock itself is a Dividend King, meaning management has paid and raised its dividend for 50 consecutive years.

This streak spans several recessions and other times of turmoil in the country, so the company has shown an ability to endure short-term pain caused by the economy.

TGT Cash and Short Term Investments (Quarterly) Chart

TGT Cash and Short Term Investments (Quarterly) data by YCharts

Looking more specifically at Target's financials, the company sits on nearly $6 billion in cash and short-term investments. It has also generated $5 billion in free cash flow over the past four quarters, so while profits are taking a hit right now, Target is still flush with cash. The company will likely be just fine through all of the current market commotion.

The stock is attractively priced

Scared investors can sometimes act without logic, which plays into the hands of Mr. Market. Investors are running away from this long-term winner due to the company's short-term headaches. The stock now trades at a price-to-earnings ratio of just 10, well below its decade-long median P/E of almost 15.

TGT PE Ratio Chart

TGT PE Ratio data by YCharts

But perhaps the funny thing is that the shares are arguably even cheaper than that level, because the hit on Target's earnings is inflating the P/E ratio. Earnings per share (EPS) for Q2 2022 were $2.16, down 48% from $4.17 last year!

Again, revenue was strong, so assuming that profitability bounces back as these challenges pass, EPS will bounce back too. Higher EPS means a lower P/E ratio, so saying Target has become a bargain could be an understatement.