Ecolab continues to post strong sales increases, but higher product costs have not allowed the company to grow its operating profit. CEO Douglas Baker vowed to change that dynamic.

“All of our good work driving sales, pricing and cost savings were largely offset by higher delivered-product costs including a currency hedging headwind,” he said Tuesday of the flat operating profit, excluding one-time events, in the company’s second quarter. “We will shift this equation in our direction as the year progresses.”

Still, the St. Paul-based maker of sanitizing and processing chemicals and filtration devices was able to beat expectations, led by new business and new products, plus pricing changes, officials said.

After the first quarter, Baker had predicted a better full year, despite mixed results for the first three months of 2017. The second quarter, indeed, proved better.

“Our business is improving, and we remain positioned to deliver good results for the year,” Baker said after releasing the second-quarter results Tuesday.

Ecolab saw sales rise 4 percent to $3.46 billion for the quarter ended June 30 amid contributions from all four business divisions. That beat the average expectation of Wall Street analysts.

Profits beat expectations by a penny, jumping 15 percent to $297 million, or $1.01 a share. Earnings benefited from cost cuts, a lower tax rate and the repurchase of 1.2 million shares of stock. Excluding one-time items, adjusted earnings were $1.13 per share.

The results were led by Ecolab’s institutional business, which provides cleaning solutions to restaurants, hotels, schools and nursing homes. The unit’s quarterly sales rose 8 percent to $1.22 billion. Profits before taxes rose 7 percent to $260 million.

Company officials credited a robust lodging business for the division uptick.

Ecolab’s industrial business — which caters to large food, beverage, paper and chemical makers — saw sales rise 3 percent to $1.2 billion, while profits fell 4 percent amid higher raw material costs.

The company’s once-troubled energy business also saw growth, with sales rising 4 percent to $792 million, even as energy profits fell 8 percent due to higher raw material costs and the restoration of employee bonuses.

Ecolab provides chemicals to the oil and gas industry that help separate water and remove corrosives. That business has been under pressure as the oil industry suffered severe pricing pressures globally.

But Ecolab spokesman Mike Monahan said the energy business is recovering, prompting officials to end the unit’s wage freeze.

In the company’s 2017 forecast, Ecolab predicted that adjusted earnings would grow 8 to 12 percent and reach $4.70 to $4.90 per share. Baker said the second half of the year should have better earnings-growth comparisons than the first half.

Ecolab shares closed at $131.43, down less than 1 percent.

CFRA research analyst Christopher Muir maintained his “hold” rating on the stock, but increased his stock price target for the full year.

“We see product innovation, cost management and improving energy sector fundamentals helping earnings-per-share growth,” he said.