Sales of new homes shot up to a record high in July, the Commerce Department reported in August.

New-home sales in July soared to a seasonally adjusted annual rate of 1.41 million units. That represented a 6.5 percent increase from June's pace of 1.32 million units, which had been the previous record. The performance in July surprised economists who were predicting that sales of new homes would fall in July.

By region, sales rose in the west and northeast but fell in the midwest and south.

The median price of a new home in July was $203,800, down from $212,400 a year ago. The median price is where half sell for more and half sell for less.