We're halfway through the calendar year, and Procter & Gamble (NYSE:PG) shareholders are just keeping pace with the broader market. Yes, their stock has underperformed the broader Dow Jones Industrial Average. But toss dividends into the mix, and P&G's 7% gain isn't that far from the Dow's 8% increase to date.

Below, we'll look at the major operating and financial trends that have made P&G a solid investment so far in 2017.

Weak sales growth

PG Revenue (Annual) Chart

PG Revenue (Annual) data by YCharts.

Revenue has tumbled over the past few years, declining 8% in fiscal 2016 following the prior year's 5% dip. Investors shouldn't spend much time focusing on this top-line figure, though, since it can be temporarily depressed by foreign-currency swings and by P&G's aggressive portfolio-slimming initiatives.

Strip those temporary shifts out, and organic growth was a tiny -- but still positive -- 1% last year and 2% in fiscal 2015.

Improving profitability

PG Operating Margin (TTM) Chart

PG Operating Margin (TTM) data by YCharts.

Despite the far-lower sales base, P&G's annual operating profits have held steady, at roughly $10 billion. Shareholders can thank the company's aggressive cost-cutting and restructuring moves that have seen it slice $2 billion out of its yearly expenses since fiscal 2012.

Management believes they can keep that savings pace going at least through fiscal 2019, which should allow the company to beat most industry rivals. Its 20% operating margin only trails Colgate Palmolive, while leaving peers like Kimberly-Clark and Unilever far behind.

Historic dividend

PG Dividend Chart

PG Dividend data by YCharts.

With 60 consecutive years of increased payments, P&G has one of the longest dividend streaks on the market. That's a function of its prime position in massive global markets -- like diapers, paper towels, and razors -- that tend to enjoy healthy demand, even during recessions.

Slumping earnings over the past few years caused P&G's payout ratio to spike to an uncomfortably high percentage of earnings, but the metric has improved lately. That gain provided the company flexibility to hike its dividend at a 3% pace following last year's tiny 1% raise.

Diving share count

PG Average Diluted Shares Outstanding (Annual) Chart

PG Average Diluted Shares Outstanding (Annual) data by YCharts.

While it has been cautious with dividend raises lately, P&G has been an aggressive buyer of its own stock. In fact, the company spent just over $10 billion on buybacks over the last two fiscal years. Share repurchases make up the biggest component of a capital return plan that is showering investors with $22 billion in 2017 alone.

Time will tell whether management made these purchases at prices that increased overall shareholder value. But in any case, they have sharply lowered P&G's outstanding share count and, thus, increased per-share profits.

Healthy cash flow

Cash flow chart.

Image source: P&G investor presentation.

P&G's organic growth pace has trailed the market over the past few years, leading to a discouraging trend of market-share losses. However, its efficient operations are still throwing off tons of cash. The company's long-term goal for free-cash-flow productivity (cash flow as a percentage of earnings) is 90%, or better. It has trounced that target, with productivity passing 100% in each of the last two years.

P&G believes it will turn 95% of earnings into free cash during the 2017 fiscal year. That financial win should combine with an uptick in sales growth to deliver solid overall returns for shareholders.

Looking ahead, investors will want to see a bold organic-sales forecast for fiscal 2018 when P&G posts its quarterly results in early August. After all, the company has finally completed a portfolio reboot that executives have said should add at least 1 percentage point to its growth pace going forward.

This article represents the opinion of the writer, who may disagree with the “official” recommendation position of a Motley Fool premium advisory service. We’re motley! Questioning an investing thesis -- even one of our own -- helps us all think critically about investing and make decisions that help us become smarter, happier, and richer.