BEIJING--China's inflation slowed across its producer and consumer sectors last month, which should give the central bank more room to stimulate slowing economic growth.

The producer-price index edged up 0.1% in January, slowing from a 0.9% on-year gain in December, the National Bureau of Statistics said Friday.

January's reading for factory-gate prices is the slowest since September 2016, when it also inched up 0.1% on year. Inflation for producers matched a median forecast by economists polled by The Wall Street Journal.

Prices of raw materials edged down 0.1% last month, compared with a 1.0% gain in December, while prices of consumer products climbed 0.6% in January, compared with December's 0.7% growth, said Dong Yaxiu, an analyst with the statistics bureau.

The PPI dropped 0.6% in January from a month earlier. In December, it declined 1.0% from the month before.

China's consumer-price index rose 1.7% in January from a year earlier, compared with a 1.9% increase in December, the bureau said. January's increase was the slowest in 12 months.

Food prices rose 1.9% from a year earlier, slowing from December's 2.5% growth. Nonfood prices rose 1.7% from a year earlier, the same as December's increase.

The key inflation reading was slightly lower than the median 1.8% gain forecast by economists polled in the survey.

On a month-over-month basis, the CPI rose 0.5% in January. In December, the index was unchanged from the previous month.

Write to Liyan Qi at liyan.qi@wsj.com