Investing in stocks over the long term is a proven strategy for gaining sizable wealth. But predicting short-term price movements, which many people love to try, is inherently difficult to do with any level of accuracy. So it's extremely valuable for investors to run through various scenarios to understand how their businesses could perform in different situations. 

So is it possible that Home Depot's (HD -0.30%) stock, at about $318 per share as of this writing, could reach $400 in 2023? Let's see how likely this 26% gain really is given the circumstances. 

Home Depot: A closer look at the numbers 

Home Depot now trades at a price-to-earnings (P/E) ratio of 19, which is meaningfully lower than what the stock has sold for over the past decade. If we simply assume this P/E remains constant over the next 12 months, then the business must increase diluted earnings per share (EPS) by 26% in order for the share price to hit our $400 target. 

From fiscal 2011 through fiscal 2021 (ended Jan. 30, 2022), Home Depot was able to increase its revenue and diluted EPS at compound annual rates of 7.9% and 20.2%, respectively. The key to this superb financial performance might surprise you because it didn't happen from new store openings. In fact, Home Depot's footprint expanded by only 69 net new locations, or 3% in total, between the third quarter of 2012 and the third quarter of 2022. 

The outstanding financial gains can be attributed to driving greater volume from each location. In the fiscal 2012 third quarter, sales per square foot were $307. By the latest quarter, this figure had more than doubled to $619. And this helps explain why the average Home Depot location generated $16.8 million in revenue in the three-month period that ended Oct. 30. That is an astronomical amount. 

Home Depot's focus on bolstering its omnichannel presence certainly helped -- the company's digital infrastructure is a major competitive strength today. Also, the business has quickly ramped up its sales to professional contractors, which now account for about half of total revenue.  

But investors must remember that for most of the past decade, the Federal Reserve had a loose monetary policy, and interest rates were kept low. This provided an accommodating backdrop for Home Depot's business to thrive. 

Even someone who barely follows financial news would know how different the macroeconomic picture is today. Inflation has been surging for over a year now, and in an attempt to control rising prices, central banks have rapidly raised interest rates. If we're not already in a recession, many pundits are forecasting one -- whether severe or mild -- sometime in 2023. 

And this would hurt Home Depot's business. The company benefits when interest rates are low, inflation isn't running hot, and housing prices are climbing, because these are the perfect ingredients for people to take on expensive home-improvement projects. Fixing up that basement or installing an entirely new kitchen is an easier financial decision when times are good.

To Home Depot's credit, however, revenue did increase 5.6% in the most recent quarter compared to the prior-year period. And for the full fiscal year, management expects same-store sales to rise 3%. When considering Home Depot's impressive gains over the past couple of years, producing growth on top of this is something to be happy about. 

Slim chance for Home Depot stock to reach $400

How likely is it that Home Depot can increase EPS by 26% next year, so that the stock can reach $400? Based on what I touched on above about the current macroeconomic environment, I don't see this as a probable scenario. The company would need to see a major boost in revenue and profitability at a pace that's greater than its average over the past decade. That this could happen with a potential recession on the horizon is not a bet I'd want to make. 

For some context, Home Depot's stock has produced at least a 27% annual return in five years since 2013, so that's a favorable track record. Investors might assume that with the stock down 22% this year, a rebound is sure to happen. 

If the P/E expands significantly in 2023, then sure, Home Depot could hit $400 per share. But this is impossible to predict. Nonetheless, investors might want to still look at buying shares in this longtime market outperformer.