It was the second straight day of gains after Wednesday's rout, when major US indices fell more than 1.5 percent on worries about President Donald Trump's growth agenda following a series of stumbles and scandals.
The Dow Jones Industrial Average finished at 20,804.84, up 0.7 percent.
The broad-based S&P 500 won 0.7 percent to 2,381.73, while the tech-rich Nasdaq Composite Index advanced 0.5 percent to 6,083.70.
The gains suggested investors were eager to jump in and take advantage of depressed prices after Wednesday's losses.
US oil prices finished above the psychologically important $50 a barrel level, boosting energy shares such as Dow member Chevron and Halliburton.
Other Dow members with strong gains were industrials Boeing, Caterpillar and General Electric, all up about two percent.
Farm machinery maker Deere surged 7.3 percent after reporting a 62 percent rise in second-quarter earnings to $802.4 million and describing an improvement in equipment demand in South America.
Gap fell 3.9 percent after reporting a 12.6 percent rise in first-quarter earnings to $143 million. Analysts expressed worry that two of the company's store chains, Gap and Banana Republic, had lower comparable sales.
Other companies with large stock moves after earnings included Foot Locker, down 16.7 percent, and Autodesk, up 14.7 percent.