Procter & Gamble (PG -0.78%) is among the most well-known stocks on the market. The consumer staples giant is a core member of the Dow Jones Industrial Average, after all, and has been paying a dividend for more than a century. It markets dozens of popular brands that are used by millions of people around the world each day. Chances are good, in fact, that you have several of its products in your house right now.

But what makes P&G such an attractive long-term investment? 

For P&G, it pays to be the leader

P&G competes in the consumer staples industry where it's the market-share leader in massive niches like diapers, paper towels, and laundry detergent. As a result of this prime positioning, the business enjoys unusually strong growth and is somewhat insulated from recessions. That's because consumers tend to prefer their favorite brands, and demand for these essentials doesn't decline much when spending rates slow down.

P&G's latest earnings report showcased those competitive strengths. Organic sales were up 7% year over year in the most recent quarter, compared to rival Kimberly-Clark (KMB -0.87%) and its 5% increase. P&G was able to boost prices by 7% year over year across the portfolio to offset higher costs.

Volume only declined by 1% year over year in response, while Kimberly-Clark endured a 4% volume drop. It pays to be the market-share leader.

Procter & Gamble is leading on margins

Abnormally high profit margins are usually a good sign that a business has enduring competitive advantages. P&G clearly fits this bill.

KMB Operating Margin (TTM) Chart

KMB Operating Margin (TTM) data by YCharts.

P&G's profit margin routinely lands above 20% of sales, or nearly 10 percentage points above Kimberly-Clark's rate. That figure is on the upswing right now, too, thanks to several quarters of price increases combined with cost cuts.

P&G was already a highly efficient business before these initiatives. It converts nearly all its earnings into cash flow, for example, allowing management plenty of flexibility to invest in the business.

These spending priorities include marketing, but they are topped by research and development. The company needs to consistently innovate around products, packaging, and its value proposition to stay ahead of peers.

The good news is that investors have a long, successful track record to evaluate here. Steady innovation wins in areas like fabric care and home cleaning supplies should help P&G continue to extend its valuable market-share lead.

About that Procter & Gamble dividend

P&G shares are understandably valued at a premium, compared to Kimberly-Clark. Investors are paying 4.4x annual revenue for the stock right now, while its smaller rival is priced at below 2x sales. Yet both valuations are below recent highs. That's likely because the short-term industry outlook is cloudy as consumer spending patterns slow.

Patient investors can look past those challenges to focus on P&G's broader assets. Its brand strength should allow it to outgrow its peers, even if a recession develops over the next few quarters. The company will likely lead the industry out of any downturn, just as it has in the past.

In the meantime, smart investors can sit back and collect P&G's dividend, which currently yields 2.8%. That dividend has been paid like clockwork for 133 consecutive years and has been boosted in each of the last 67 years. Those incredible streaks reflect P&G's enduring business advantages and count as additional reasons to consider putting this stock in your portfolio today.