The Dow and S&P closed at all-time highs of 14,164 and 1,565 in October 2007.
Tech stocks weighed on the Nasdaq, which closed flat.
Stocks have been climbing higher for most of the past year as worries about the European sovereign debt crisis have receded, and the global economy continues to prove its resilience.
A pickup in housing has bolstered investor optimism, and once again the sector showed signs of strength Tuesday.
Home prices posted their biggest jump in 6 years,while shares of homebuilder DR Horton(DHI) jumped more than 10% after the company more than doubled its quarterly profit.
Shares of Pfizer(PFE) led the Dow's gains, following the drugmaker's better-than-expected quarterly results. Shares of rival Eli Lilly and Co(LLY) also rallied after the company beat quarterly earnings and sales forecasts.
Ford(F) was a major drag on the broader market. The car company posted higher fourth-quarter income and sales, boosted by strong results in North America. But worse-than-expected weakness from Europe weighed on Ford's shares, which slid 5%.
Shares of Apple (AAPL)gained nearly 2%, after the company announced a new iPad with more storage.
Glass maker Corning (GLW)also got a big boost after delivering earnings and sales ahead of forecasts.
Priceline stock moves to warp speed
On the downside, shares of data storage equipment maker EMC(EMC) plunged after the company's earnings outlook fell short of estimates.
Yahoo(YHOO) shares faltered, day after CEO Marissa Mayer called the company's turnaround "a multi-year march towards growth" as Yahoo posted earnings that beat expectations.
Shares of VMWare(VMW) dropped more than 20% after the company lowered its 2013 guidance and announced a strategic restructuring.
Shares of Amazon.com(AMZN) surged after hours even though the company missed analyst forecasts and issued lowered guidance for 2013.
Research in Motion(RIMM) dropped 3% one day before the company plans to release a new Blackberry 10. Facebook(FB) will release earnings after the bell Wednesday, and its stock dropped more than 5%. Shares of Groupon(GRPN) also fell 2%.
Tuesday also marked the start of the Federal Reserve's first monetary policy meeting of the year. At the conclusion of the two-day meeting Wednesday afternoon, investors will look for clues from the central bank's statement for when the bond buying program could end.
European markets closed up between 0.1% and 0.8%. Asian markets ended mixed, as Hong Kong's Hang Seng edged lower while the Shanghai Composite and Japan's Nikkei both posted gains of about 0.3%.
The dollar declined versus the euro and the British pound, but gained ground against the Japanese yen.
Oil prices dipped, while gold prices rose slightly.