Procter & Gamble Co posted a higher quarterly profit on Friday, as trimming costs and raising prices helped mitigate the impact of more expensive materials and some sluggish markets such as the United States.

P&G, which makes everything from Gillette razors to Pampers diapers, earned $2.51 billion, or 84 cents per share, in the fourth quarter ended in June, compared with $2.19 billion, or 71 cents per share, a year earlier.

Sales rose 10 percent to $20.86 billion, while the volume of goods sold rose 3 percent.

(Reporting by Jessica Wohl; Editing by Lisa Von Ahn)