Producer prices in China fell at their slowest rate in 16 months in April, while consumer prices climbed 2.3% in the same month.
The Dow Jones Industrial Average was up 222.44 points to 17928.35.
The  Nasdaq composite rose 59.67 to 4809.88, while the S&P 500 climbed 25.70 to 2084.39.
After slipping on Monday, oil prices also rose as wildfires in Canada continued to force suppliers to halt production.
OPEC president Mohammed bin Saleh al-Sada said on Tuesday that he expected the oil market recovery to continue as global demand increased in the second quarter of the year.
The US benchmark West Texas crude gained 2.8% to $44.66 a barrel and Brent crude climbed 4.5% to $45.60.
As a result Exxon Mobile shares were up 1.6%, while Hess rose 5.9%.
Shares of Southwestern Energy climbed 7%.
Oilfield servicing company Schlumberger saw its share price rise 1.8%. ConocoPhillips shares price climbed 2.9%.
Disney shares were up 1.2%. The media giant releases its quarterly earnings report after markets close.
Shares of ecommerce firm Amazon jumped 3.4% after an analyst report raised its outlook for the company. On Tuesday, Amazon also launched a new video publishing website intended to be a rival to YouTube.
(Close): Wall Street markets had their biggest gains in two months following a global rally set off by positive Chinese inflation data.