New York - Strong earnings from Facebook and anticipation of banner results from Amazon and Google parent Alphabet pushed US stocks mostly higher on Thursday, with the tech-rich Nasdaq scoring the biggest gains.
Facebook climbed 1.3% after reporting that net profit surged 186% in the second quarter to $2.05bn on growing online advertising revenues.
Shares of Amgen and MasterCard also rose following earnings reports, offsetting declines from Ford and others that reported disappointing results.
The Dow Jones Industrial Average lost 0.1% at 18 456.35.
The broad-based S&P 500 advanced 0.2% to 2 170.06, while the tech-rich Nasdaq Composite Index climbed 0.3% to 5 154.98.
Sixty-eight percent of S&P 500 companies to report earnings so far have bested expectations, said S&P Global Market Intelligence.
"The majority of earnings reports are better than expected," said Michael James, managing director of equity trading at Wedbush Securities.
"Certainly there are some disappointments, but for the most part, they are better than estimates."
Ford plunged 8.1% as it warned it may miss its 2016 profit targets due in part to a cooling of the US auto boom that has forced car dealerships to boost incentives.
Rival automakers General Motors and Fiat Chrysler lost 3.2% and 4.8%, respectively.
Whole Foods Market tumbled 9.3% as it reported a 22.1% drop in fiscal third-quarter net income to $120m and said comparable store sales dropped 2.6%.
Other companies to rally after earnings reports were Groupon, up 28.8%; GrubHub, up 24.4%; and Tempur Sealy International, up 16.8%.
Cloud-computing company NetSuite surged 18.4% on news it agreed to be acquired by software giant Oracle for $9.3bn. Oracle rose 0.6%.