(Reuters) - Procter & Gamble Co's PG.N quarterly revenue and adjusted profit beat Wall Street expectations on Tuesday, sending shares to a record-high even as the world's No.1 personal goods company took an $8 billion charge on its Gillette shaving business.

Slideshow ( 3 images )

P&G reported a net loss of about $5.24 billion, or $2.12 per share, for the quarter ended June 30, due to an $8 billion non-cash writedown of Gillette. For the same period last year, P&G’s net income was $1.89 billion, or 72 cents per share.

Cincinnati-based P&G, which operates in 80 countries, sells Gillette razors, gels and foams worldwide and said the writedown was due primarily to currency fluctuations - enduring strength in the U.S. economy in recent years has strengthened the dollar. The charge was also driven by more competition over the past three years and a shrinking market for blades and razors as consumers in developed markets shave less frequently. Net sales in the grooming business, which includes Gillette, have declined in 11 out of the last 12 quarters.

“Initial carrying values for Gillette were established nearly 14 years ago in 2005. ... New competitors have entered at prices below the category average,” Chief Financial Officer Jon Moeller said on a call.

P&G paid $57 billion in 2005 for Gillette, the world’s No.1 shaving brand that is more than a century old. But in the 2010s technology altered the way consumers purchased razors, and relaxed social norms prompted men to shave less often, according to a Euromonitor report. In the past 5 years, the U.S. men’s market for shaving products has shrunk by over 11%, the data firm said.

For a graphic, click tmsnrt.rs/2LOT0X1.

P&G has been cutting prices and investing in new products at its grooming business, hoping to claw back market share from upstart shaving brands bought by rivals, such as Unilever's ULVR.L Dollar Shave Club and Edgewell Personal Care's EPC.N recent acquisition of Harry's.

For instance, P&G recently launched a razor called SkinGuard, designed for men with sensitive skin prone to irritation. Gillette’s share of the U.S. men’s razors and blades market slipped in 2018 while that of Harry’s and Unilever grew, Euromonitor data showed.

P&G has signaled to analysts for some time that it might write down Gillette, given the market’s issues; the charge is just an accounting expression of what we knew was happening to the business, Bernstein analyst Ali Dibadj said.

Excluding items, the company earned $1.10 per share, beating the average analyst estimate of $1.05 as strong demand for SK-II and Olay beauty products drove P&G’s organic sales up 7%. Price hikes contributed 3 percentage points to organic sales growth, a closely watched metric which excludes items like acquisitions, divestitures and currency effects. Organic sales for all 10 of P&G’s global categories grew.

Shares rose nearly 5% to a record high of $121.76, before paring gains to 4.2% at midday.

P&G, like other consumer goods companies, has been raising prices on many of its products to tackle soaring freight and raw material costs that have dented margins. Organic sales in P&G’s 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 which sells Tide detergent and Febreze air fresheners, organic sales climbed 10%.

“Expectations were creeping higher into the print, but P&G far exceeded even the most optimistic expectations,” Wells Fargo analyst Bonnie Herzog said, adding that P&G’s organic sales growth of 7% was its strongest in 13 years.

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.