Procter & Gamble Co. reported a better-than-expected rise in quarterly profit as cost cuts and higher prices helped more than offset the impact of a strong dollar.

P&G, which has posted declines in sales for the last seven quarters, has been shrinking its portfolio to focus on faster-growing brands such as Tide detergent and Gillette shaving products.

The company said its cost of goods sold fell by 11 percent to $7.92 billion and that it raised prices by 1 percent in the third quarter ended March 31.

Net income attributable to P&G jumped to $2.75 billion, or 97 cents per share, in the quarter, from $2.15 billion, or 75 cents per share, a year earlier.

Excluding items, the company earned 86 cents per share.

Net revenue fell 7 percent to $15.76 billion, including a 5 percentage point impact from foreign exchange.

Analysts on average had expected earnings of 82 cents per share and revenue of $15.81 billion, according to Thomson Reuters I/B/E/S.