(AP) -- Surprisingly strong earnings from Netflix, UnitedHealth Group and other companies put investors in a buying mood Tuesday, driving U.S. stocks solidly higher.
Health care stocks led the gainers. Materials, utilities and a broad swath of other companies also posted gains. Industrials and consumer-focused stocks notched the smallest gains. Energy stocks also rose as the price of crude oil recovered from an earlier slide.
The rally wiped out the market's losses from the day before.
"We've had five consecutive quarters of negative earnings, and this one looks like we're going to squeak out a positive, which is very good for the market," said Doug Cote, chief market strategist for Voya Investment Management. "Earnings are coming in better, and some much better, than expected."
The Dow Jones industrial average gained 75.54 points, or 0.4 percent, to 18,161.94. Standard & Poor's 500 index rose 13.10 points, or 0.6 percent, to 2,139.60. The Nasdaq composite index added 44.01 points, or 0.9 percent, to 5,243.84.
Investors are poring over company earnings reports to gauge the market's prospects for growth in coming months and get a better handle on the state of the economy. About 80 of the companies in the S&P 500 were scheduled to report quarterly results this week. So far, about 10 percent have done so since the latest reporting period began last week.
Earnings for the third quarter are projected be down about 1 percent overall from a year ago, according to S&P Global Market Intelligence. That forecast is largely due to the energy sector, which has been hard hit by falling energy prices.
While it's still early, some market watchers are encouraged by the results so far.
"It looks like corporate earnings certainly could start to trend positive," Cote said. "Fundamentals drive markets and positive earnings are a necessary precursor for this bull market to continue."
Health care, which has been the worst performing sector this year, notched the biggest gain Tuesday, 1.1 percent. It remains down 2.6 percent this year.
Investors bid up shares in several companies in the sector, including UnitedHealth Group.
The nation's largest health insurer climbed 6.9 percent after its profit swelled 23 percent to nearly $2 billion in the third quarter. The company also increased its 2016 earnings forecast. The stock rose $9.26 to $143.39.
Netflix surged 19 percent a day after the video streaming service reported earnings that were far better than analysts were expecting. The company noted it grew its domestic and international subscribers during the quarter. The stock added $18.99 to $118.79.
Domino's Pizza jumped 4.9 percent after the company delivered a 25 percent jump in quarterly profit as sales rose. The stock gained $7.44 to $159.45.
Del Taco Restaurants climbed 8.8 percent after the restaurant chain served up solid sales in the third quarter. It also raised its annual profit and revenue projections. The stock added $1.11 to $13.74.
Banks, several of which reported strong earnings last Friday, continued to deliver strong quarterly results. Goldman Sachs rose 2.1 percent after growth in its trading and investment business helped lift earnings. The stock added $3.63 to $172.63. Comerica also posted better-than-expected quarterly results. The lender climbed $1.99, or 4.1 percent, to $50.05.
Some companies reported improved results but missed on their earnings forecasts.
IBM slid 2.6 percent a day after issuing a full-year earnings outlook that fell short of what analysts were expecting. The stock fell $4.05 to $150.72.
U.S. benchmark crude oil rose 35 cents, or 0.7 percent, to close at $50.29 a barrel in New York. Brent crude, the international standard, gained 16 cents, or 0.3 percent, to close at $51.68 a barrel in London.
Other energy futures also eked out small gains. Wholesale gasoline inched up a penny to $1.51 a gallon. Heating oil was little changed at $1.57 a gallon. Natural gas rose 2 cents to $3.26 per 1,000 cubic feet.
The major stock indexes in Europe also rebounded Tuesday.
Germany's DAX rose 1.2 percent, while the CAC-40 in France gained 1.3 percent. The FTSE 100 index of leading British shares rose 2 percent. Several stock markets in Asia also pushed higher. Japan's Nikkei 225 added 0.4 percent, while South Korea's Kospi gained 0.6 percent. Hong Kong's Hang Seng index jumped 1.6 percent. Australia's S&P/ASX 200 rose 0.4 percent.
In metals trading, the price of gold rose $6.30 to $1,262.90 an ounce, while silver added 16 cents to $17.64 an ounce. Copper was little changed at $2.11 a pound.
Bond prices rose. The yield on the 10-year Treasury note fell to 1.74 percent from 1.77 late Monday.
In currency markets, the dollar strengthened to 103.89 yen from 103.85 on Monday, while the euro weakened to $1.0977 from $1.0997.