By Lucia Mutikani

WASHINGTON (Reuters) -U.S. consumer prices increased moderately in July, though rising costs for goods because of import tariffs led to a measure of underlying inflation posting its largest gain in six months.

The consumer price index rose 0.2% last month after gaining 0.3% in June, the Labor Department’s Bureau of Labor Statistics said on Tuesday. In the 12 months through July, the CPI advanced 2.7% after rising 2.7% in June. Economists polled by Reuters had forecast the CPI rising 0.2% and increasing 2.8% year-on-year.

Excluding the volatile food and energy components, the CPI rose 0.3%, the biggest gain since January, after climbing 0.2% in June. The so-called core CPI increased 3.1% year-on-year in July after advancing 2.9% in June.

The Federal Reserve tracks diff

See Full Page