Few companies generate as much profit as Procter & Gamble (PG -0.13%). The business behind such powerhouse brands as Tide detergent, Crest toothpaste, and Pampers diapers last year booked over $15 billion of earnings as its profit margin hit a record high 16% of sales.

Read on to find out how the consumer products titan manages to produce that mountain of cash.

A woman stacks quarters into rows.

Image source: Getty Images.

Dominating its markets

Most of Procter & Gamble's competitive advantage derives from its leadership position in the markets in which it competes. It boasts a deep portfolio of brands that dominate their segments, including the Gillette franchise that accounts for almost 65% of the global market for blades and razors. Pampers, P&G's biggest single brand, delivers a whopping 25% share of worldwide sales of diapers, training pants, and baby wipes. The Tide and Downy brands control about the same proportion of global fabric care sales, too.

A Tide detergent bottle and canister of Tide Pods.

Image source: Getty Images.

P&G has seen its market share slip in a few of these categories over the last few years as consumers shifted more purchases to value-based brands, and as disruptive newcomers like Dollar Shave Club -- purchased last year by Unilever (UL 1.26%) -- won over customers with both their products and business models.

That's why P&G engaged in a massive transformation effort under which it reduced its portfolio by 100 brands, leaving it with just those franchises that enjoy the best market positions. P&G still must engineer faster growth in the 60 or so brands that it kept, but its sales growth pace should improve now that it is more focused on its core strengths.

Being efficient

P&G's operating model is strong, and it's growing more powerful as management focuses on improving efficiency in today's weak sales environment. Thanks to cuts to expenses totaling over $10 billion over the past few years, operating profitability has improved by 2 percentage points since 2012. Gross profit margin hit 50% of sales last year, too, -- up from 48% two years prior -- as the company's net profit margin jumped to 15.7% of sales from 11.7%. P&G's profitability level today is target that rival Unilever says it aspires to reach too -- by 2020.

PG Operating Margin (TTM) Chart

PG Operating Margin (TTM) data by YCharts

P&G converts nearly all of these earnings into free cash flow, with the rate hitting 94%, or $9.8 billion, in the last fiscal year. That incredible financial efficiency allows for large cash returns to shareholders through dividends and stock repurchases, including $22 billion last year alone.

Watch organic growth

Even after accounting for those direct cash returns, though, Procter & Gamble's stock performance hasn't kept pace with the broader market lately. That's a key reason why it faced a challenge from an activist investor aiming for a strategic shakeup. Billionaire Nelson Peltz of Trian Fund Management is agitating for a seat on P&G's board of directors, and hopes to convince the team to make major changes he believes will invigorate sales growth.

Procter & Gamble executives disagree with Peltz's assessment, and in their defense, they can point to recent improvements as evidence that their turnaround plan is working and just needs more time to play out. Organic sales growth, after all, sped up to a 2% pace this past year from 1% in the prior year period.

Still, investors who have watched P&G's market share slip lower for nearly three years now ' might be running out of patience. For the fiscal year ahead, P&G is predicting further improvements to profitability and higher earnings. Yet the stock is likely to react more directly to shifts in the company's growth pace that will either confirm its rebound gaining momentum, or show that it's continuing to struggle in a brutally competitive marketplace.