The Standard & Poor's 500 index added 9.90 points, or 0.5 percent, to 1,983.53. The Dow Jones industrial average rose 61.81 points, or 0.4 percent, to 17,113.54. The Nasdaq composite advanced 31.31 points, or 0.7 percent, to 4,456.02.
Chipotle surged $69.84, or 12 percent, to $659.77, the biggest gain in the S&P 500 index. The burrito chain reported that stronger sales drove its quarterly profit up 26 percent. The restaurant chain's results beat analysts' expectations, even as it raised prices on a range of menu items.
Comcast, the country's largest cable company, reported quarterly profits that topped Wall Street's targets as more people signed up for Internet service. Comcast gained 81 cents, or 1.5 percent, to $54.63.
Wall Street is in the middle of corporate earnings season, when companies release their quarterly results. Investors pore over those reports to gauge the financial health of Corporate America, and in turn, the U.S. economy. Roughly 150 companies in the S&P 500 will report their results this week, including AT&T and Boeing on Wednesday. Visa and Amazon will report on Thursday.
Not all the results released Tuesday were positive. Weak sales of Diet Coke and fruit juice weighed down Coca-Cola's second-quarter results, leading the company to post weaker revenue than Wall Street expected. Overall profit fell slightly. Coca-Cola's stock sank $1.21, or 3 percent, to $41.19.
Even though companies continue to post higher profits, the market still looks expensive compared to its historical average. The S&P 500 currently trades for 17.4 times earnings over the previous 12 months. The long-run average is closer to 15.
"In the short term, I expect the market to continue higher," said Brad McMillan, the chief investment officer at Commonwealth Financial. "But I am concerned about the market's valuation."
On the economic front, investors got another tame report on inflation. U.S. consumer prices inched up 0.3 percent in June, with most of the increase coming from higher gasoline prices, according to the Labor Department. Core prices, which exclude the volatile food and energy sectors, were up just 0.1 percent. Over the past year, core prices are up 1.9 percent, close to the Federal Reserve's target rate for inflation.
U.S. government bond prices rose, pushing the yield on the 10-year Treasury note down to 2.46 percent. Benchmark U.S. crude oil fell 17 cents to $104.42 a barrel.
In other company news:
Herbalife jumped $13.75, or 26 percent, to $67.77. Activist investor Bill Ackman, who has a $1 billion bet against the company, vollied his latest attack against the nutritional supplement and weight-loss company, but investors appeared to dismiss it.