Shares of Facebook Inc gained 4.6 percent after the social media giant said margins would stop shrinking after 2019 as costs from scandals ease.
The S&P communication services sector, which also houses Alphabet and Netflix, rose 3.0 percent.
Amazon.com Inc and Apple Inc, other members of the FAANG group, climbed as well.
"Tech is leading the way," said Mike Dowdall, investment strategist at BMO Global Asset Management in Chicago. "Growth stocks, broadly, are closing the gap with value a little. They've been underperforming them by a decent amount."
"Facebook earnings came in decent yesterday after the market close. That's provided a bit of support for tech overall," Dowdall said.
The high-flying group has powered U.S. stock market's decade-long bull run, but fears of rising borrowing costs, global trade disputes and possible slowdown in U.S. corporate profits have pummeled the stocks recently.
General Motors Co shares jumped 8.7 percent and were on track to post their biggest one-day gain since late May, after the No. 1 U.S. automaker posted robust quarterly results and forecast strong full-year earnings.
The Dow Jones Industrial Average rose 400.03 points, or 1.61 percent, to 25,274.67, the S&P 500 gained 49.42 points, or 1.84 percent, to 2,732.05 and the Nasdaq Composite added 193.64 points, or 2.7 percent, to 7,355.29.
Although the S&P 500 is on track to post its first two-day gains for the month on Wednesday, it is still on track for its worst biggest monthly percentage drop since August 2015. The Nasdaq was on pace for its biggest monthly loss since 2008.
Mostly stronger-than-expected results have pushed up third-quarter profit growth estimates for S&P 500 companies to 26.3 percent, according to Refinitiv data.
Defensive sectors were the only decliners.
The financial sector rose 2.4 percent and the S&P 500 regional banks index gained 3.1 percent, on the U.S. Federal Reserve's proposal to ease regulations for banks with less than $700 billion in assets.
Advancing issues outnumbered declining ones on the NYSE by a 2.13-to-1 ratio; on Nasdaq, a 1.95-to-1 ratio favored advancers.
The S&P 500 posted 10 new 52-week highs and 4 new lows; the Nasdaq Composite recorded 31 new highs and 93 new lows. (Additional reporting by Shreyashi Sanyal & Sruthi Shankar in Bengaluru and April Joyner in New York; editing by Sriraj Kalluvila and Nick Zieminski)
(This story has not been edited by Devdiscourse staff and is auto-generated from a syndicated feed.)