Home-improvement retailers Lowe's (LOW -0.04%) and The Home Depot are alike in many regards. However, for 15 years, Lowe's has trailed Home Depot significantly when it comes to profitability.

There are different ways to measure profitability, but a particularly important one is a company's operating margin. This is the profit produced by core business operations, before other considerations such as taxes and interest are factored in.

As the chart below shows, Home Depot's operating margin has been superior to that of Lowe's for about 15 years now:

LOW Operating Margin (TTM) Chart

Data by YCharts.

In 2018, however, Lowe's made a change at the CEO position, bringing in former J.C. Penney CEO and Home Depot executive Marvin Ellison. The goal for Ellison was to help Lowe's reach its full operational potential.

It would appear Lowe's choice in leadership was a smart one. The chart below shows just how rapid the operational improvement has been for Lowe's since Ellison's arrival, compared to its top rival:

LOW Operating Margin (TTM) Chart

Data by YCharts.

Consider that Lowe's is a company with $90 billion in trailing-12-month revenue, so even just a single percentage point improvement in profit margins has a big impact. Therefore, investors should understand what exactly Lowe's is doing to close the gap with Home Depot and whether it can make even more progress going forward.

What Lowe's did right

In 2018, only 40% of Lowe's payroll was dedicated to people out on the floor selling. Over the subsequent two years, Ellison increased this percentage to 60%. Another big change was getting vendors for Lowe's to pay for a team to be in charge of making sure merchandise was properly stocked at all times.

As a result of these changes, Lowe's started winning more market share among both do-it-yourself (DIY) customers and professionals. It appears that having products on the shelves when needed and increasing staff on the floor to provide direct assistance makes a difference in customer satisfaction.

One of the key metrics for this discussion is sales per square foot of selling space. In 2018, Lowe's had net sales of $71.3 billion generated from 209 million square feet of selling space. In 2022, it only had 195 million square feet of selling space, but full-year net sales were up to $97.1 billion.

More sales from less space equals operating leverage.

The improved customer service for DIY customers and pros contributed to increasing Lowe's sales per location, and that's a big reason its operating margin is catching up to Home Depot's.

Lowe's also did other things right during this time, such as improving its e-commerce platform and revamping aspects of its supply chain.

What can Lowe's do now?

Lowe's continues to invest in making its labor more efficient. Among other moves, it's developed tools to flex scheduling more around peak customer hours and given employees tools that allow them to help customers faster. A lot of the low-hanging operational improvements are likely already complete, but these other moves can certainly help as well.

It's important to note this isn't empty talk from Lowe's. Sales were down in fiscal 2023 due to industry headwinds, and yet the company's operating margin still improved. That's hard to pull off, and it demonstrates that the operational improvements are yielding the intended result.

LOW Revenue (TTM) Chart

Data by YCharts.

Lowe's isn't expected to report full-year fiscal 2023 results until next month, and it probably won't provide guidance for 2024 until then. However, based on its progress over the last five years and other ongoing efforts, it's not out of the question for Lowe's to finally get its operating margin over 14% and in line with Home Depot's.

Higher profits usually lead to a higher stock price, so this is worth watching. I'm not necessarily saying Lowe's stock will outperform the market from here -- that's a separate discussion.

However, Lowe's has been on a fruitful multiyear journey to improve its business. That positive path continues, and it should make shareholders comfortable holding the stock.