The Nasdaq rose 3 percent, a day after it confirmed a correction and registered its biggest decline since 2011.
The Dow and S&P 500 both moved back in positive territory for the year.
Microsoft jumped 5.8 percent after it beat consensus estimates for revenue and profit. That, along with gains in chipmakers, helped technology stocks rise 2.89 percent.
"It's a little bit of an oversold bounce. Earnings have helped," said Robert Pavlik, chief investment strategist and senior portfolio manager at SlateStone Wealth LLC in New York.
Yet, he said, "you can't look at it blindly and say earnings are turning the market around and we're all clear. A lot of people are skeptical right now of any kind of action in the market, especially to the upside."
The market also has had lighter trading volume on up days than down, which Pavlik said suggested the recent bout of selling might not be over.
About 9.2 billion shares changed hands on U.S. exchanges on Thursday, compared with 9.6 billion in Wednesday's rout and 11.44 billion when it sold off on Oct. 11.
The latest round of upbeat results came from a wide range of companies, including Ford Motor Co, Visa Inc, Whirlpool Corp and Twitter Inc, and offered relief after the earnings season began on a tepid note and then geared lower on sluggish outlooks from manufacturers and chipmakers.
The Dow Jones Industrial Average rose 401.13 points, or 1.63 percent, to 24,984.55, the S&P 500 gained 49.47 points, or 1.86 percent, to 2,705.57 and the Nasdaq Composite added 209.94 points, or 2.95 percent, to 7,318.34.
The Nasdaq registered its biggest daily percentage gain since March 26.
Stocks have sold off recently amid worries over the impact of tariffs and China's profit slowdown, as well as concerns ranging from rising costs, bond yields, Italy's budget struggles and upcoming U.S. congressional elections.
In a further sign that economic growth is moderating, U.S. business spending on equipment appeared to have remained slow in September and the goods trade deficit widened further as rising imports outpaced a rebound in exports.
But the recent sell-off has also made stocks slightly cheaper. The S&P 500's valuation fell to a two-and-a-half year low of 15.3 times profit estimates for the next 12 months from 15.8, according to Refinitiv data.
Results from S&P 500 companies have pushed up third-quarter profit growth estimates to 23.6 percent from 21.8 percent in the last 10 days. But dour forecasts have pulled down fourth-quarter growth estimates to 19.4 percent from 19.9 percent, according to I/B/E/S data from Refinitiv.
Ford, which is struggling with sales in China, rose 9.9 percent as its earnings report raised hopes for a strong finish to the year, bolstering gains in the consumer discretionary sector.
Advanced Micro Devices' weak forecast sent its stock tumbling 15.4 percent. But the Philadelphia Semiconductor index rose 2.3 percent, helped by Xilinx's 15 percent jump on its strong quarterly report.
After the bell, shares of Amazon.com and Alphabet fell sharply following the release of their results. Amazon was down 3.9 percent while Alphabet was down 3.4 percent.
Advancing issues outnumbered declining ones on the NYSE by a 2.35-to-1 ratio; on Nasdaq, a 2.43-to-1 ratio favored advancers.
The S&P 500 posted 1 new 52-week highs and 37 new lows; the Nasdaq Composite recorded 15 new highs and 225 new lows. - Reuters
Did you find this article insightful?