What happened

Today's Consumer Price Index (CPI) data on inflation has investors running scared. That includes selling shares of popular retailers like Home Depot (HD -0.31%), Target (TGT -0.54%), and Lowe's (LOW -0.14%). As of 1:50 p.m. ET on Tuesday, all three stocks were trading near the day's lows. Home Depot and Lowe's were down 4.9% and 4.6%, respectively, while Target shares were 2.7% lower at that time. 

So what

After a series of interest rate hikes by the Federal Reserve, investors expected to see signs of inflation plateauing or even declining from the August data released today. Consumer prices rose 8.3% on an annual basis in August. That was a decline from July's pace of 8.5%, but investors expected more of a deceleration. 

But the details behind the numbers are what had investors especially concerned for the outlook in these particular retailers. Many economists and investors look at the so-called core CPI that excludes food and energy due to the higher volatility in these areas. Core CPI doubled what it showed just one month ago. It rose 0.6% in August versus an increase of 0.3% in July. Expectations were for that rate of increase to remain the same. An acceleration in the segments besides food and energy is a concern for those in the housing and clothing businesses. 

Now what 

Home Depot and Lowe's are obviously reliant on the housing industry. Both cater to contractors building new homes as well as those upgrading existing ones. If the housing industry in general is slowing, some investors equate that to potential headwinds for these home improvement leaders. 

So far, both companies have weathered the headwinds well. Home Depot grew net earnings by 11.5% year over year in the second quarter. Comparable-store sales increased 5.8%, and the company reaffirmed its full-year outlook. That outlook includes an assumption of a slowdown, with comps growth ending the year at about 3%.

Lowe's didn't see increasing sales, and it expects sales to remain flat versus the strong prior-year results. But Lowe's did see increasing sales to its professional customer base. Home Depot has also been working to grow that segment. Having a strong base of do-it-yourself customers along with professional contractors should help both companies. That allows for business to remain strong whether new housing construction booms or if consumers feel like they should focus on maintaining existing homes. 

Target's business includes a mix of home goods and clothing among other products. Investors might be mostly concerned with how consumers will handle persistent inflation. But Target caters to a wide range of consumer income levels, and it has handled economic cycles well in the past. Inventory issues are what caused the stock to sink about 30% in a single week in May. But the company has ongoing plans for addressing that problem, and investors have started to get back into Target stock. 

With these stocks down between 24% and 30% year to date, their valuations have become compelling. Forward price-to-earnings ratios range from 20 for Target to about 17 and 15 for Home Depot and Lowe's, respectively. Long-term investors might want to start dipping into these names now.