* Company passes on cost increases to customers

* Posts strongest ever Q1 sales, earnings

* Shares surge following guidance upgrade

* CEO confident about rest of year

ZURICH, April 22 (Reuters) - Holcim raised its full-year sales outlook on Friday after posting forecast-beating first quarter results, helped by price hikes to offset surging energy costs and new acquisitions in its roofing business.

The Swiss company's shares rose 6% in early trade after it exceeded analysts' expectations for sales and earnings, a performance that also reassured investors about its ability to pass on cost inflation to customers.

"We had a fantastic quarter," Holcim CEO Jan Jenisch told reporters, after sales rose 20% to 6.44 billion Swiss francs ($6.74 billion), topping forecasts for 6.1 billion francs in a company-gathered consensus of analysts.

"I would say pricing and acquisitions both had the same effect, both around 10%, and then we had a slight volume increase especially in aggregates and ready mix concrete and also roofing systems," he said.

The company, which is quitting Russia following Moscow's invasion of Ukraine, is the latest to hike its prices to offset rising energy, transport and labour costs.

Food companies Nestle and Danone as well as engineering company ABB said earlier this week they have taken similar action to prevent profits being squeezed.

"We believe we are in a good situation for the challenging cost inflation and when you look at the volumes we are very confident," Jenisch said.

DEMAND SEEN STRONG

Demand would also continue to be strong, Jenisch said, citing increasing populations and the need to repair and refurbish crumbling infrastructure.

Holcim posted earnings before interest and tax of 614 million Swiss francs ($644.21 million), 16% up from a year earlier and well ahead of the 443 million francs forecast.

It said it now expects to increase sales this year by at least 8% on a like-for-like basis, which cuts out the impact of acquisitions and divestments and currency swings. Previously Holcim said it expected a 6% increase.

The upgrade pushed Holcim to be the top performer on the Stoxx Europe 600 Construction Index, and also boosted shares in peers including Germany's HeidelbergCement and France's Saint-Gobain.

"Solid volume growth, price increases, and lower depreciation charges offset cost inflation, resulting in positive EBIT growth also on a like for like basis," said Vontobel analyst Bernd Pomrehn, cheering the Holcim results.

Holcim last year bought Firestone Building Products for $3.4 billion and Malarkey Roofing Products in a $1.35 billion deal as it seeks to reduce its reliance on cement and expand into building systems and products. ($1 = 0.9553 Swiss francs) (Reporting by John Revill; Editing by Miranda Murray and Emelia Sithole-Matarise)