The price of US crude was up 56 cents to $44.67 a barrel, helping to lift shares in oil giant Chevron by 1.9%.
The Dow Jones rose 229.09 points to 16,600.05, while the S&P 500 added 25.06 points to 1,978.09. The Nasdaq was up by 54.76 points at 4,860.52.
Investors are expected to remain cautious ahead of Thursday's Federal Reserve meeting.
Analysts are still split over whether the Fed will decide to raise rates for the first time in nine years.
The latest economic data showed that US retail sales rose 0.2% last month, which was slightly below forecasts.
So-called core retail sales - which exclude cars, fuel, building materials and food services - were up 0.4% in August.
Separate figures showed that US manufacturing output fell by 0.5% in August, the sharpest decline since January 2014.
The drop was mostly caused by carmakers cutting back production, with car output down 6.4%, the biggest fall for three years.

The deal for Pearson, 24, who scored nine goals in 51 appearances in all competitions last season, is a record for an Accrington sale.
The versatile defender is Barnsley's 11th summer signing ahead of their Championship season-opener on Saturday.
"Matty has some exceptional qualities that we feel we can work with and make better," boss Paul Heckingbottom said.
Pearson began his career with Blackburn Rovers and played for Rochdale and Halifax Town before joining Stanley in May 2015, going on to make 103 appearances.
Barnsley begin their Championship campaign at Bristol City on Saturday.
Find all the latest football transfers on our dedicated page.

Jay Brenton Liptrot, 43, was among the first on the scene of the blaze in Prestatyn in October, 2012.
He gave evidence at the trial of one of the tenants, Melanie Smith, who was convicted of five murders.
Mr Liptrot will appear before Prestatyn magistrates on Friday.
The blaze resulted in the deaths of Lee-Ann Shiers, 20, her partner Liam Timbrell, 23, their son Charlie, 15 months, Ms Shiers' nephew Bailey, four, and niece Skye, two.
(Close): US markets closed higher, with energy stocks leading the way following a rise in the price of oil.
[NEXT_CONCEPT]
Barnsley have signed defender Matty Pearson from Accrington Stanley on a three-year deal for an undisclosed fee.
[NEXT_CONCEPT]
A firefighter who owned the house in which five people died in an arson attack has been summonsed to appear in court in connection with manslaughter through gross negligence.