Stocks finished moderately higher in an uneven session Tuesday as optimism about the economy helped investors overcome some of their uneasiness about the Federal Reserve's decision on interest rates.

The Dow Jones industrial average rose 32.53, or 0.26 percent, to 12,523.31.

Broader stock indicators were also higher. The Standard & Poor's 500 index was up 8.20, or 0.58 percent, at 1,428.82, and the Nasdaq composite index rose 7.55, or 0.31 percent, to 2,448.64.

Click here to visit FOXBusiness.com's Investing Center.

The energy sector rose on a 5 percent spike in oil prices, while news that billionaire investor Carl Icahn was seeking to join Motorola Inc.'s (MOT) board lifted technology stocks.

But fluctuations in the major indexes reflected the market's uncertainty as it waits for the Fed to complete a two-day meeting Wednesday afternoon. Market watchers are expecting the central bank to keep rates unchanged as they have for the past four meetings after 17 straight hikes, because recent economic data has been showing slow, stable growth.

Now that investors have abandoned their hopes for a rate cut anytime soon, many are regarding this year's positive economic reports and the Fed's holding pattern as auspicious for stocks.

"If the Fed feels the economy is strong enough on its own, it means corporate earnings this year will probably be better than people were expecting," said Alfred E. Goldman, chief market strategist at A.G. Edwards & Sons Inc. in St. Louis.

The Conference Board, a business research group, said consumer confidence rose modestly in January as the job market remained strong. That report followed regional Fed reports on Monday showing manufacturing growth in the Midwest and Texas.

The bond market edged lower as fixed income investors also awaited the Fed's decision. The yield on the benchmark 10-year Treasury note was up slightly at 4.88 percent from 4.87 percent late Monday.

The dollar was little changed against other major currencies, while gold prices inched up.

Oil prices shot higher Monday on signs of production cuts from OPEC members. A barrel of light sweet crude rose $2.96 to settle at $56.97 the New York Mercantile Exchange. Natural gas soared more than 11 percent on forecasts of frigid temperatures in the Midwest.

Stock investors brushed off worries about fuel costs crimping consumers' discretionary spending, and instead focused on a possible swell in oil companies' profits.

In response to the spike in energy prices, Exxon Mobil Corp. (XOM) rose $1.19 to $74.39, Chevron Corp. (CVX) rose $1.54 to $73.07, and ConocoPhillips (COP) rose $1.03 to $65.65.

Meanwhile, Motorola rose $1.27, or 6.9 percent, to $19.58, after Icahn revealed his stake in the cell phone maker and expressed interest in joining the board.

Consumer products maker Procter & Gamble Co. (PG) said higher sales of Gillette razors and Tide detergent helped fiscal second-quarter profit jump 12 percent. However, shares fell 29 cents to $64.59.

Merck & Co. (MRK) fell 60 cents to $44.91 after the drug company posted a 58 percent decline in quarterly profit. The company was hurt by restructuring charges and increased legal reserves linked to the withdraw of the painkiller Vioxx.

3M Inc., which makes products such as Post-It notes and Scotch tape, had profit that jumped 58 percent after taking a large gain on the sale of its pharmaceutical business. However, the company — often considered a barometer of U.S. business health because of the products it sells — missed Wall Street expectations after stripping out that gain. Its shares fell $4.26, or 5.4 percent, to $74.70.

Goldman said the Dow would be about 30 points higher if it weren't for 3M's disappointing results. Overall, corporate earnings have been coming in fairly strong.

"Fourth-quarter earnings are running 10.5 percent ahead of last year. It's a good increase, but we've been spoiled," Goldman said, noting that investors grew accustomed to higher double-digit earnings last year, but that the average gain is about 7 percent.

"On balance, earnings have been coming in somewhat better than expected. Secondly, the consumer confidence figures from the Conference Board were encouraging," said Hugh Johnson, chairman and chief investment officer of Johnson Illington Advisors.

He added that gains were held in check, though, by worries about the statement that will accompany Fed policy makers' decision on Wednesday.

"It appears to me as though the economy is stronger than they expected, and many governors have stated concerns about inflation," Johnson said. If that is reflected in Wednesday's statement, he said, it may be difficult for the stock market, as a rate hike later in the year could curb consumer spending.

The Russell 2000 index of smaller companies rose 4.87, or 0.61 percent, at 797.97.

Advancing issues led decliners by more than 2 to 1 on the New York Stock Exchange, where volume came to 1.53 billion shares compared to 1.54 billion late Monday.

Overseas, Japan's Nikkei stock average rose 0.11 percent. Britain's FTSE 100 rose 0.03 percent, Germany's DAX index rose 0.93 percent, and France's CAC-40 gained 0.46 percent.

Click here to visit FOXBusiness.com's Investing Center.