The seasonally adjusted Consumer Price Index rose more than expected on both fronts, as the core rate ticked up 0.3% (0.327%) in July, contributing to a 2.5% year-over-year change. Total inflation rose 0.8% (0.818%) in the month and 5.6% on the year, according to data released by the U.S. Labor Department on Thursday.

The consensus was looking for a 0.2% gain in the core and a 0.4% rise in total inflation. Moreover, annual gains were expected to be only 2.4% in the core and just 5.1% in the all-items category.

Headline inflation is the highest since January, 1991. Core inflation matches the annual gain seen in January this year. The Fed's unofficial target rate for core inflation is 2.0%.

Energy prices rose 4.0% in July and are up 29.3% on the year, while gas rose 4.1% in the month and 37.9% in the year, and fuels & utilities are up 3.3% in the month and 16.0% on the year.

Food and beverages rose 0.9% on the month and are up 5.8% year-over-year. Commodities rose 1.2% from the previous month and are up 7.8% on the year.

Owners' equivalent rent rose 0.1% from the previous month and is now 2.6% higher than the same period last year.

The index for housing rose 0.6% in July following a 0.5% increase in June. Services advanced by 0.5% in July, contributing to a 4.1% annual increase.

Prices for apparel rose 1.2% in the month, and transportation costs moved up 1.7% in the month.

By Patrick McGee and edited by Stephen Huebl