The numbers were much higher than economists had expected.

Prices were 2.7% higher last month compared with a year ago, and core inflation went up at a higher pace than what was seen in June

CPI was projected to increase 0.2% in July and 2.8% for a year ago on headline, and 0.3% and 3% on core

The consumer price index rose 2.7% in July on an annual basis. There's some evidence tariffs are putting upward pressure on inflation, economists said.

Prices on goods affected by tariffs saw biggest surges while prices less contingent on foreign imports saw decreases.

The producer price index was expected to a show a 0.2% increase for July, according to the Dow Jones consensus estimate.

The numbers were much higher than economists had expected.

The producer price index — which measures inflation before it hits consumers — was up 0.9% last month from June and 3.3% from a year earlier, much higher than expected.

The threat of inflation to the U.S. economy may be looming after a Bureau of Labor Statistics report Thursday showed a jump in wholesale prices.

US producers raised prices at the fastest pace in more than three years last month, stoking concerns about higher prices for consumers.