Procter & Gamble (PG) said its second-quarter profit fell 49% and sales missed Wall Street expectations, as rising commodity costs and other charges wiped away sales gains.

The maker of Crest toothpaste and Gillette razors said volume fell slightly in developed regions, but higher prices helped to alleviate increasing commodity costs. By segment, all units booked modest increases, led by a 6% improvement to $4.2 billion in its baby care and family care unit.

The Cincinnati-based consumer goods behemoth posted net earnings of $1.7 billion, or 57 cents, compared with $3.36 billion, or $1.11, the year earlier. Excluding the one-time charges, P&G made $1.10 a share, just ahead of average analyst estimates of $1.08 in a Thomson Reuters poll.

Revenue for the three-month period grew 4% to $22.13 billion, compared with $21.3 billion in the year-earlier period, narrowly below the Street’s view of $22.19 billion.

“We continue to make progress against our key business priorities in a difficult macroeconomic environment,” chief executive Bob McDonald said in a statement. “We delivered solid top-line growth and continued to accelerate productivity improvements to drive down costs.”

Looking ahead, the company expects higher prices will continue contributing to sales growth, with prices increasing sales by 4% and unfavorable products and geographic mix offsetting it by 1% to 2%.

P&G sees core earnings in the range of $4 to $4.10 a share in fiscal 2012, down from its earlier forecast of $4.15 to $4.33 a share due largely to foreign exchange. Wall Street is looking for a profit of $4.17 a share on sales of $86.15 billion.

Follow Jennifer Booton on Twitter at @Jbooton