The U.S. Consumer Price Index rose by 0.1 percent in May, according to a report released Tuesday by the Bureau of Labor Statistics, matching what a consensus of economists expected for the closely watched inflation gauge.

Analysts polled by expected, on average, a 0.1 percent gain in May, following a 0.4 percent drop in April.

The CPI, which measures the change in the price of goods and services purchased by consumers in a month, accounts for a majority of overall inflation.

The cost of housing rose 0.3 percent and accounted for more than half of the seasonally adjusted increase in May's total rise. Energy prices rose modestly, driven by increases in electricity and natural gas. Gasoline prices were flat in May, the report said. The BLS said food prices dropped 0.3 percent in May.