Inflation at the wholesale level cooled significantly last month, helped by a sharp drop in energy prices, according to data released Wednesday by the Bureau of Labor Statistics.

The consumer price index in June was expected to increase 3.8% from a year ago.

U.S. consumer inflation eased in June more than analysts forecasted, government data showed Tuesday, as energy prices declined momentarily last month...