Procter & Gamble Co’s quarterly revenue and profit beat Wall Street expectations on Tuesday, boosted by price hikes and strong demand for its beauty products such as SK-II and Olay, sending its shares up about 4% before the opening bell.

P&G, like other consumer goods companies, has been raising prices on its products to tackle soaring freight and raw material costs that have dented margins.

In the fourth quarter, organic sales, a closely watched metric which exclude items like acquisitions, divestitures and currency effects, rose 7%, its best in at least two years. Price hikes contributed 3 percentage points to the organic sales growth, the company said.

Organic sales in the beauty business rose 8%, boosted by demand for its super-premium SK-II brand and Olay skin care products.

In the fabric and home care unit, the company’s biggest business that sells Tide and Febreze air fresheners, organic sales climbed 10%.

The company’s net sales rose 3.6% to $17.09 billion in the fourth quarter, beating analysts’ average estimate of $16.86 billion, according to IBES data from Refinitiv.

The Pampers diaper maker reported a net loss attributable to the company of $5.24 billion, or $2.12 per share, for the quarter ended June 30, primarily due to non-cash accounting adjustments related to its Gillette Shave Care business. This compares to net income of $1.89 billion, or 72 cents per share, a year earlier.

Excluding items, the company earned $1.10 per share, beating the average analyst estimate of $1.05.

Reuters (Reporting by Soundarya J in Bengaluru; Editing by Maju Samuel)