Consumer confidence was better than expected in August, beating projections from economists surveyed by Reuters.

The consumer sentiment index, a survey of consumers by The University of Michigan, rose to 97.6 in August. Economists estimated the index would climb to 94 from the 93.4 reading in July.

"Consumer confidence rose in the first half of August to its highest level since January due to a more positive outlook for the overall economy as well as more favorable personal financial prospects," Richard Curtin, chief economist for the Surveys of Consumers, said in a statement.

Curtin added a caveat that the incidents in Charlottesville, Virginia, were too recent to assess whether or how much it might "weaken consumers' economic assessments." He said fallout from the Charlottesville violence will "reverse the improvement in economic expectations recorded across all political affiliations in early August."

The consumer sentiment index nearly returned to peak levels recorded earlier in 2017.

The index measures 500 consumers' attitudes on future economic prospects, in areas such as personal finances, inflation, unemployment, government policies and interest rates.

Correction: The consumer sentiment index was 93.4 in July. An earlier version misstated the figure.