U.S. stocks rallied on Friday following better-than-expected data on the economy's growth and consumer sentiment, which suggested the recovery is taking hold, as well as stronger results in the tech sector.

The U.S. economy grew at a 5.7 percent pace in the fourth quarter, much higher than the 4.6 percent growth forecast by a Reuters poll. The first estimate of the nation's output in the last three months of 2009 put gross domestic product growth at its fastest pace since the third quarter of 2003, according to the U.S. Commerce Department.

Other data showed January consumer sentiment rose more than expected to hit a two-year high, and business activity in the U.S. Midwest expanded more than forecast in January.

The stronger-than-expected manufacturing data, coming on top of the stronger-than-expected GDP data, increases confidence about the strength and durability of the recovery, said Jim Awad, managing director at Zephyr Management in New York.

The Dow Jones industrial average <.DJI> gained 95.98 points, or 0.95 percent, to 10,216.29. The Standard & Poor's 500 Index <.SPX> gained 10.27 points, or 0.9663 percent, to 1,094.97. The Nasdaq Composite Index <.IXIC> gained 20.54 points, or 0.95 percent, to 2,199.70.

Microsoft Corp and Amazon.com Inc late Thursday reported quarterly results that beat expectations. Microsoft, a Dow component, expects business technology spending to recover in 2010, while Amazon forecast strong 2010 revenue.

Amazon shares gained 2.8 percent to $129.60 while Microsoft was 0.3 percent lower at $29.07.

Dow component Chevron Corp edged 0.6 percent higher to $73.66 after reporting its fourth-quarter results while Honeywell International Inc lost 2.2 percent to $38.94 after its profit fell from the prior year.

(Editing by Padraic Cassidy)