NEW YORK — U.S. stocks declined Tuesday, with equities sliding the most in two weeks, as quarterly results from IBM and United Technologies disappointed investors.

NEW YORK — U.S. stocks declined Tuesday, with equities sliding the most in two weeks, as quarterly results from IBM and United Technologies disappointed investors.

Apple Inc. declined in late trading after iPhone shipments missed forecasts, and Microsoft fell following its largest-ever quarterly net loss. International Business Machines dropped 5.9 percent during regular trading after sales fell for a 13th quarter. United Technologies lost 7 percent after cutting its 2015 profit forecast.

The Standard & Poor’s 500 index retreated 0.4 percent to 2,119.21, after earlier coming within three points of an all-time high set in May. The Dow Jones industrial average lost 181.12 points, or 1 percent, to 17,919.29, with IBM and United Technologies accounting for 66 percent of the drop. The Nasdaq composite index declined 0.2 percent from a record.

"Right now it’s about earnings, where they’re coming in and what they’re seeing for next quarter, and when the Fed is going to eventually raise rates," said Thomas Garcia, the head of equity trading at Santa Fe, New Mexico-based Thornburg Investment Management Inc. "If you look at the market valuation, it’s not off the chart, but it is priced for good earnings."

The S&P 500 had rallied 4 percent through Monday since a low on July 8, reclaiming almost all of its losses that stemmed from worries over Greece’s debt crisis and China’s market rout. It’s still trailing most developed-market benchmarks this year. The Nasdaq composite index closed Monday at its third consecutive all-time high.

"You have a couple fairly large names that are weak and depressing sentiment," said Michael Antonelli, an institutional equity sales trader and managing director at Robert W. Baird & Co. in Milwaukee. "You’re also brushing up against the top part of the trading range. A lot of people are looking toward Apple’s earnings to pull us out of this."

The benchmark index has been stuck in a 90-point range since the beginning of February, including a span of nine weeks where the measure moved less than 1 percent in either direction. Stocks have tested both ends of the range this month, falling as low as 2,046.68 on July 8 and climbing as high as 2,128.28 on Monday.

The earnings season is picking up pace, with about a quarter of S&P 500 companies releasing results this week. Analysts project a second-quarter profit drop of 5.3 percent for the gauge’s members, less steep than July 10 estimates for a 6.4 percent decline.

Apple sank 6.9 percent as quarterly iPhone shipments and the company’s revenue forecast for the current period missed analysts’ projections, raising questions over whether demand for the device has peaked. Apple slid 1 percent in regular trading.

Microsoft fell 3.5 percent after hours, with results hurt by a $7.5 billion writedown as the purchase of Nokia’s handset unit failed to rescue the company’s mobile business. Excluding the charge and costs related to job cuts, the software giant’s profit beat analysts’ estimates while revenue was in line. Shares rose 0.8 percent during regular trading.

Investors will also watch economic reports for clues on when the Federal Reserve will raise rates, with housing and jobless-claims data due later this week.

The Chicago Board Options Exchange Volatility Index sank 0.2 percent Tuesday to 12.22 after Friday reaching its lowest level since December. The gauge tumbled 29 percent last week, the biggest such slide since January. Nine of the S&P 500’s main groups declined, led by phone and industrial companies.

United Technologies dropped the most since Sept. 2011 after cutting its profit forecast amid weak demand, weighing on the S&P 500’s industrials group. Rockwell Collins slumped 3.6 percent, its biggest drop in 22 months, while General Dynamics declined for just the second time in 12 sessions, losing 1.8 percent.

IBM was the largest drag on technology companies in the benchmark index as its shares fell the most since October. The company’s sales to the so-called BRIC countries fell 35 percent in the second quarter. Xerox slumped 2.9 percent.

Verizon Communications lost 2.4 percent, its biggest decline since December, after quarterly revenue missed analysts’ estimates and the company cut its 2015 sales outlook. AT&T and CenturyLink fell more than 0.9 percent as phone companies were the worst-performing group in the the benchmark equity index.

Commodities pared a rebound from Monday’s 13-year lows, and raw-material companies lost earlier gains. Energy shares were little changed after an early rally, as oil trimmed its first rise in five sessions.

Consol Energy and Halliburton rose at least 2.8 percent, offset by Chesapeake Energy’s 9.5 percent tumble to a nearly 12-year low after it halted its dividend payout. Consol’s biggest shareholder called on the company to spin off or sell its natural gas operations.

Miners Freeport-McMoRan and Newmont Mining climbed more than 3.1 percent after Monday’s selloff. Barrick Gold gained 1.2 percent after falling 16 percent to a 25- year low Monday.

Trucking companies rose, with the Dow Jones transportation average reaching a one-month high. C.H. Robinson Worldwide Inc. and Con-way Inc. increased more at least 1.7 percent.

Thoratec soared 18 percent, the most in more than five years, to a record. People familiar with the situation said the maker of implants that aid failing hearts is in talks to be acquired by St. Jude Medical. St. Jude added 0.2 percent.

Harley-Davidson rallied 5 percent, the biggest gain since October, after its quarterly profit beat analysts’ estimates. The motorcycle maker also affirmed its full-year shipment forecasts.


With assistance from Sofia Horta e Costa in London.