The Dow and the S&P 500 rose on Tuesday after strong earnings and upbeat outlooks from big manufacturers like 3M Co , but Apple's slide ahead of its results drove the Nasdaq down.

Shares of Apple Inc fell 2 percent to $560.28 in volatile trading ahead of the company's results, due after the close.

The stock of the world's most valuable company has fallen in recent weeks after its huge run higher. Apple's stock was last up 38 percent for the year - in contrast with a gain of nearly 60 percent for the year so far earlier this month.

3M reported an increase in quarterly profit and slightly lifted its full-year outlook, helping the Dow, along with AT&T Inc.

The earnings season so far has been stronger than analysts expected. With results in from 153 S&P 500 companies, more than three-fourths have topped analysts' estimates, according to Thomson Reuters Proprietary Research.

U.S. corporate earnings are actually coming in pretty strong, said Natalie Trunow, chief investment officer of equities at Calvert Investment Management in Bethesda, Maryland, whose firm manages about $13 billion in assets.

Negatives are being paid attention to more at the moment than the positives, but the positive earnings reports are providing some support here.

The Dow Jones industrial average <.DJI> gained 74.39 points, or 0.58 percent, to 13,001.56 at the close. The Standard & Poor's 500 Index <.SPX> rose 5.03 points, or 0.37 percent, to 1,371.97. The Nasdaq Composite Index <.IXIC> slipped 8.85 points, or 0.30 percent, to 2,961.60.

Adding to weakness in tech, Netflix Inc shares sank 13.9 percent to $87.68, a day after it forecast slower subscriber growth this quarter.

Texas Instruments Inc forecast second-quarter revenue growth above estimates, signaling the end of a prolonged inventory-related decline in demand, but the results weren't enough to counter the broader weakness in tech. Its stock slid 1.7 percent to $31.36.

Many analysts have cautioned that a correction is near, given the stock market's sharp rally since October. The S&P 500 is up 9.1 percent so far for the year.

When you see the big spread between the Dow and the Nasdaq, you know that there's a bit of a flight to safety there, so people are leaving the over-the-counter stocks and buying the higher quality securities. So New York didn't look as strong as it might have appeared, said Douglas Davis, chief executive officer of Davis-Rea in Toronto.

But the S&P 500 should hold near-term support at 1,340 in the current retreat before rallying again, according to Brown Brothers Harriman analysts. The index held at 1,340 during a pullback in early March, which coincides with a 23.6 percent retracement of the rally from October.

AT&T advanced 3.6 percent to $31.72, while 3M gained 1.6 percent to $88.49. Shares of United Technologies , which also reported results that beat forecasts, edged up 0.1 percent to close at $79.85.

Economic data took a backseat to earnings news.

U.S. single-family home prices rose for the first time in 10 months in an encouraging sign the battered sector was starting to stabilize, according to the latest S&P/Case-Shiller report.

Separately, the government said single-family home sales sagged to their lowest level in four months, but sales in the previous three months were revised higher than initially thought. U.S. consumer confidence edged slightly lower in April, according to a report from the Conference Board, a private research group.

(Additional reporting by Claire Sibonney; Editing by Jan Paschal)