STOCKHOLM - H&M reported stronger than expected March-May profits on Thursday and said third-quarter sales were also off to a good start as the company strives to catch up with faster-growing rivals.

Shares in the world's second-biggest fashion retailer were up 7% in early trade following the results.

H&M, which has lagged Zara owner Inditex, has sought to raise its fashion appeal and boost its higher-priced brand Cos, targeting shoppers less vulnerable to the rising cost of living as fast-fashion giant Shein takes market share with less expensive clothes.

H&M increased sales in many markets despite a squeeze on consumers' spending ability and "unfavourable" weather," CEO Helena Helmersson said, adding that its summer collection had got off to a good start as temperatures rose across northern Europe.

Inditex and others have also reported good sales on the back of well-received summer collections and hot weather.

"The conditions for increased growth as well as profitability continue to develop in a favourable direction," the CEO added.

H&M's operating profit margin in the second quarter was 8.2%, down from 9.2% a year earlier, while the group reiterated its goal of a 10% margin next year, which analysts have said could be hard to reach.

The profit margin was supported by easing input costs from improved macroeconomic conditions as well as from positive effects from a cost cutting program.

The group last year announced layoffs and other cost cuts that it said at the time would help it save costs from the second half of 2023 onwards.

"The external factors that affect our purchasing costs continue to improve, work on the cost and efficiency programme is proceeding at full speed, and much of the work that we have done in recent years is starting to bear fruit," the CEO said.

Operating profit in the Swedish group's March-May second quarter was 4.74 billion Swedish crowns ($438.55 million) down from 4.98 billion a year earlier but above the 4.07 billion forecast by analysts in a Refinitiv Eikon poll.

Local currency sales for June 1-27 to begin H&M's third quarter were up 10% from a year earlier.

H&M's share price has risen 27% in the last 12 months, lagging a 58% increase in Inditex stock.

($1 = 10.8084 Swedish crowns)

(Reporting by Marie Mannes, editing by Mark Potter and Jason Neely)