2024 has been a great year for the S&P 500 and Nasdaq Composite. But home improvement behemoths The Home Depot (HD 0.80%) and Lowe's Companies (LOW 0.30%) are down on the year after reporting weak guidance.

Here's what's challenging both companies and whether either dividend stock is a buy now.

A person working on a do-it-yourself home improvement project outside.

Image source: Getty Images.

A tough road ahead

Expectations were low heading into recent reports by Home Depot and Lowe's. Home Depot has an extra week in its current reporting year. Once factoring that in, it was guiding for a slight decrease in sales and earnings. Lowe's was guiding for lower sales and profits as well.

In its first-quarter 2024 earnings release, Home Depot reaffirmed weak guidance. Management discussed challenged consumer spending and a tight housing market as reasons for low margins and a sluggish overall performance. Home Depot CFO Richard McPhail said the following on the Q1 2024 earnings call:

At some point, spend on housing shifts from discretionary to something that you simply must do. We know that there's pent-up demand for household formation. And so, again, I'd say short term, it is having an impact on our customers' mindset. And it's not just housing turnover-related spend. It's really all large projects. As Billy said, sort of debt finance spend where we are seeing interest rates sort of weigh on the mind of customers. And look, we're not immune to this. If you look at the national figures on what's really driving the consumer right now, it's services. Goods are underperforming services, and durable goods are seeing the most pressure and, in particular, home-related categories.

Home Depot only bought back $649 million in stock, compared to $2.89 billion in the same quarter last year. The decision to allocate more earnings toward cash instead of buybacks is a defensive signal for Home Depot investors.

Lowe's is facing similar challenges. In its Q1 2024 earnings release, Lowe's said it is guiding for $84 billion to $85 billion in full-year sales and diluted earnings per share (EPS) of $12 to $12.30. For context, it earned $86.4 billion in 2023 sales and an all-time high of $13.20 in diluted EPS. Lowe's CEO Marvin Ellison said the following on the company's recent earnings call:

Uncertainty around interest rate cuts, stubborn inflationary pressures, and a consumer still showing a preference toward spending on discretionary services and experiences continue to weigh on the DIY home improvement demand. And the outlook for lower mortgage rates and improved housing turnover remains uncertain. Real wage growth and home price appreciation are solid, but the home improvement customer is still on the sidelines, expressing concerns about higher cost of living and the state of the overall economy. And while the near term is still challenging to read, we remain confident in the medium to long-term outlook for our industry, as our core demand drivers are all supportive of growth.

Despite the challenges, Lowe's made progress in reducing its operating expenses and ensuring it was prepared for weaker quarters ahead.

Follow the macro story

Home Depot and Lowe's are similar yet different businesses. Home Depot, for example, has made sizable acquisitions in recent quarters and is going on the offensive during this slowdown, specifically pertaining to catering to professional contractors. But in general, both companies depend heavily on the business cycle, consumer spending, and macroeconomic factors affecting the housing market.

It's one thing to listen to what a company says in a shareholder presentation or during an earnings call, and another to see if the data backs it up. A convenient aspect of Home Depot and Lowe's is that it's rather easy to see where the macro trends are going, and whether either company is facing a slowdown for business-specific reasons or is part of a broader slowdown.

There are a lot of metrics to choose from, but some of my favorites are consumer credit card debt, home prices, and mortgage interest rates.

US Credit Card Debt Chart

US Credit Card Debt data by YCharts

As you can see in the chart, U.S. consumer credit card debt has completely erased the progress made during the pandemic and is now at an all-time high. Meanwhile, mortgage rates have barely come down from their 10-year highs, and the Case-Shiller Home Price Index is now at an all-time high. The index measures residential real estate prices across the U.S.

Let's take it a step further and look at the volume of home sales and housing affordability.

US Existing Home Sales Chart

US Existing Home Sales data by YCharts

U.S. existing home sales are at around a 10-year low, indicating weak demand as potential buyers are discouraged by high interest rates and high prices. Perhaps the most useful metric is the U.S. fixed housing affordability index. This tool blends home prices and mortgage rates to gauge the affordability of a home with a 20% down payment. A level of 100 indicates that a family earning a median household income can afford a mortgage with a 20% down payment.

Ideally, everyone could afford a home. Seeing the index hovering around a 10-year low around that 100 threshold is a bad sign, because it indicates fewer available buyers in the market and that housing is relatively unaffordable for many Americans.

Home Depot and Lowe's benefit when people buy and improve homes, not when the market is bogged down by high interest rates and low demand. The narrative could reverse if consumers paid down debt and could afford discretionary expenses or if interest rates or housing prices came down. But for now, all the macroeconomic indicators are working against Home Depot and Lowe's.

An opportunity for patient investors

There's no sugar-coating it -- the stage is set for Home Depot and Lowe's to have poor near-term performances. Both stocks could continue slipping and fall out of favor among investors, even if the broader market continues to rally.

However, the good news is that both companies are a good value and pay growing dividends. Home Depot has a price-to-earnings (P/E) ratio of 22.2 and a dividend yield of 2.7%, compared to a less expensive 16.8 P/E ratio for Lowe's but a lower yield at 1.9%. Again, Lowe's expects a more severe downturn than Home Depot. Historically, both companies have traded at around the same valuation, with Home Depot sporting a 22.7 median P/E over the last decade compared to 22.1 for Lowe's.

Both stocks are not no-brainer buys, but they are reasonable buys at current levels. My preference leans toward Home Depot. It's the larger, more dominant player, and I like the long-term potential of its recent acquisitions. That said, investors should only consider either stock if they are comfortable with the possibility of a further sell-off and have the patience to endure a multi-year downturn.