Stocks sold off Tuesday, with the Dow Jones industrial average sliding more than 240 points to a seven-week low following a slew of disappointing earnings.

All but two of the Dow's 30 components were in the red. Only Intel (INTC) andMicrosoft (MSFT) eked out small gains.

The S&P 500 was 1.4% lower, also a seven-week low. But a strong performance from Yahoo (YHOO) helped the Nasdaq regain ground, putting the tech-heavy index down just 0.9%, an eight-week low.

Even with the day's sharp declines, all three indexes are still up between 7% and 15% this year.

Tuesday's sell-off came after three major U.S. industrial companies missed earnings expectations, igniting worries that the global economy might be on shakier ground than previously suspected.

"Our trading partners have bigger economic issues than even we have, and that's why we saw September drop off significantly for companies" said Tim Ghriskey, chief investment officer at Solaris Asset Management.

"There's continuing uncertainty about the economic health of Europe and China," he said, noting that the highly contested presidential election and looming fiscal cliff are just adding to worries about the U.S. economy.

Related: Earnings stink like a big pile of trash

Shares of chemicals maker DuPont (DD) fell nearly 9% after the Dow component reported weaker-than-expected quarterly earnings and announced plans to cut 1,500 jobs worldwide. United Technologies (UTX), which provides technology for aerospace and building industries and a Dow stock, reported better-than-expected earnings but missed on revenue and lowered its revenue forecast for next year.

3M (MMM), which makes Scotch Tape and Post-it notes and is considered an economic bellwether, reported earnings that were in line with forecasts, but the company missed revenue estimates and pulled back on its guidance.

UPS (UPS), another global economic bellwether, reported results that were roughly in line with expectations.

After the market closed, Facebook (FB) reported third-quarter sales of $1.2 billion, in line with analyst expectation. Shares of the social media giant popped 8% higher in after-hours trading.

Netflix (NFLX) shares plunged more than 15% in after-hours trading after the company reported disappointing figures for new streaming subscriptions and offered weak guidance.

Analysts at S&P Capital IQ predict third-quarter earnings for companies in the S&P 500 will grow by just 0.04% overall this quarter, the worst since the third quarter of 2009.

In addition to the earnings news, Apple (AAPL) unveiled a 7.9-inch iPad mini, half the size and weight of its original tablet at an event in California Tuesday afternoon. The tech giant also introduced a new 13-inch MacBook Pro. Despite the news, shares of the company were down more than 3%.

Related: Fear & Greed Index slides into fear territory

Stocks were already under pressure ahead of the lackluster earnings, as news surrounding Spain unnerved investors.

The euro fell below the key $1.30 level after ratings agency Moody's downgraded five of Spain's regional governments, including Catalonia -- the largest. And the gross domestic product for Spain, which has been mired in recession for months, fell by 0.4% in the third quarter from the second quarter, according to data released Tuesday from the Bank of Spain.

European stocks closed lower. Britain's FTSE 100 fell 1.4%, the DAX in Germany lost 2.1% and France's CAC 40 declined 2.2%.

Asian markets closed mixed. The Shanghai Composite slid 0.6% and Japan's Nikkei was little changed. The Hong Kong exchange was closed for a holiday.

Companies: Xerox (XRX)reported a 3% drop in revenue for the third quarter, below analyst expectations.

Shares of Harley-Davidson Inc (HOG) surged 8% after the motorcycle maker announced that new bikes are due to come out by 2015.

Target (TGT) said Tuesday that it sold its consumer credit card portfolio to TD Bank (TD) for $5.9 billion.

Shares of Monster Beverage (MNST) tumbled 10% Tuesday, after closing down 14% in the prior day's session. The Food and Drug Administration confirmed Monday that it had received five reports claiming that consuming Monster Beverage products resulted in death.

Currencies and commodities: The dollar rose against the British pound, but fell versus the Japanese yen.

Oil for December delivery sank $2.49 to $86.17 a barrel - its lowest level since mid-July.

Gold futures for December delivery fell $16.90 to $1,709.40 an ounce.

Bonds: The price on the benchmark 10-year U.S. Treasury edged higher, pushing the yield down to 1.76% from 1.80% late Monday.