U.S. stocks rallied on Wednesday on upbeat earnings results from Intel Corp. and financial giant J.P. Morgan Chase gave new hopes that companies are still making money while the U.S. economy takes a downturn.

The Dow Jones Industrial Average jumped 256.80 points, or 2.08 percent to 12619.27, the Standard & Poor's 500 index gained 30.28 points, or 2.27 percent to 1364.71 and the Nasdaq Composite Index picked up 64.07 points, or 2.80 percent to 2350.11.

Following a positive earnings report from Johnson & Johnson On Tuesday morning, three Dow components - technology bellwether Intel, financial giant JPMorgan and Coca-Cola - all beat the Street before Wednesday's opening bell.

Merrill Lynch , which will post earnings on Thursday, rose 3.6 percent. The firm is expected to make a write-down between $6 billion and $8 billion, according to The Wall Street Journal.

Shares of Intel climbed 5.8 percent as the chipmaker predicted a 56 percent gross margin for the second quarter and said revenue would be better than analysts estimated.

Coca-Cola, the world's largest soft drink company, surpassed expectations with a 19 percent increase in its first-quarter results and a 21 percent increase in sales. The company's adjusted earnings of 67 cents per share easily beat estimates from analysts polled by Thomson Financial for 63 cents.

The Commerce Department said on Tuesday that weak housing data did not have much of an impact on the market. New construction of U.S. houses dropped to its lowest level in 17 years in March.