When thinking about the home improvement business, investors probably immediately think of the two dominant forces in the industry, Home Depot (HD 0.86%) and Lowe's (LOW 1.49%). The two behemoths have a combined market cap of $410 billion (as of this writing). And both stocks have crushed the S&P 500's total return over the past five years. 

While these top retailers have demonstrated a history of revenue growth and solid profitability, Home Depot shines brighter than Lowe's in one important area. Here's what investors need to know.

Analyzing the customer base 

With trailing-12-month revenue of $155 billion, Home Depot is a larger enterprise than Lowe's, which generated sales of $95 billion over the last year. DIY and professional shoppers can find an identical assortment of merchandise at these companies' stores. Want to spruce up your backyard with a garden and brand new deck, or remodel the entire kitchen? You can go to either Home Depot or Lowe's and get the supplies and expertise you need to get the job done. 

But if we dig deeper into the customer bases of these businesses, we'll notice something interesting. About half of Home Depot's revenue today comes from professional customers, like plumbers, electricians, and general contractors, compared to 25% for Lowe's. In dollar terms, pros accounted for $77.5 billion of Home Depot's sales and $23.8 billion for Lowe's in the last 12 months. 

This is important because pros visit and spend more than DIY shoppers. DIY customers might go to their local Home Depot or Lowe's two or three times a year for various projects and upgrades that need to be done around the house; whereas, a contractor could visit two or three times per month. What's more, in Home Depot's case, it is estimated that approximately 4% of customer visits (but half of the revenue) are represented by professionals, while 96% come from DIY shoppers. 

Home Depot having a larger chunk of its overall business coming from professionals than Lowe's also translates into better financial metrics for the company. In the most recent quarter, Home Depot's operating margin of 16.5%, return on invested capital of 45.6%, and sales per square foot of $701 were all better than Lowe's figures. And I think this is specifically attributed to the company serving more professionals, as it simply results in greater sales volume per store and improved operating leverage. 

Professionals also tend to be very sticky customers, as they rely on these home improvement retailers as mission-critical partners to provide the right tools and supplies to get their projects completed on time. A typical contractor can take advantage of favorable pricing, rewards, and other perks by doing all their shopping at one retailer as opposed to both. And once Home Depot or Lowe's has their purchasing history, payment information, and other important info, it's unlikely customers will change to a competitor. 

To be fair, Lowe's is making great strides in trying to catch up to Home Depot. Lowe's current CEO, Marvin Ellison, did spend time in leadership roles at Home Depot before his current role, so he has first-hand knowledge about how valuable pros are. Over the past nine quarters, Lowe's Pro sales have registered double-digit comparable sales gains on a year-over-year basis, posting better growth than the DIY segment. 

Starting from a small base certainly helps the company achieve progress in the professional market quickly. But it's worth pointing out that this is a massive market valued at $450 billion (excluding DIY), so there is certainly room for both Home Depot and Lowe's to be successful. 

With shares of Home Depot trading at a price-to-earnings (P/E) multiple of below 18 and Lowe's shares selling at a P/E of less than 15, investors could do well by adding both retailers to their portfolios with a long-term mindset. Once the housing market recovers, whenever that may be, shareholders could benefit as the entire home-improvement industry bounces back.