U.S. stocks gained Thursday, propelling the Dow to a record close, on optimism about strong profits from companies, including Exxon Mobil Corp. (XOM), and hopes for steady interest rates.

The Dow Jones industrial average shot up 51.99 points, or 0.41 percent, to 12,673.68. The Standard & Poor's 500 Index gained 7.70 points, or 0.54 percent, to 1,445.94. The Nasdaq Composite Index rose 4.45 points, or 0.18 percent, to 2,468.38.

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

Economic data on consumer prices pointed to mild inflation, underscoring views that interest-rate increases this year were unlikely.

Exxon Mobil shares added 1.3 percent and ranked among the biggest gainers in both the blue-chip Dow average and the S&P 500 after the oil company reported the highest full-year profit in U.S. corporate history.

Shares of biotechnology company Gilead Sciences Inc. (GILD) climbed to a lifetime high and helped lift the Nasdaq, as well as the S&P 500.

"There's not a lot hindering the market," said Mike Binger, portfolio manager at Thrivent Financial in Minneapolis.

"Interest rates are in check and the economy is doing well and inflation seems under control and earnings look good."

The S&P 500 index had its highest close since September 2000, while the Dow also reached a record intraday high at 12,682.57.

After the bell, shares of Amazon.com Inc. (AMZN) rose 3.4 percent to $40 in extended-hours trading after the Internet shopping site posted quarterly results that beat Wall Street's estimates. The stock closed on Nasdaq at $38.70., up 2.7 percent, or $1.03.

A day after the Federal Reserve left the benchmark federal funds rate unchanged at 5.25 percent and indicated no new worries about inflation, the government reported that core consumer prices, excluding volatile food and energy costs, rose 0.1 percent in December after being unchanged in November.

Economists polled by Reuters had expected the gauge, closely watched by the Fed, to rise higher.

Friday's data includes the January nonfarm payrolls report.

In Thursday's regular trading, Boeing Co., the aircraft manufacturer and No. 2 U.S. defense contractor, led the Dow higher for the second day in a row. Analysts at Banc of America Securities and Credit Suisse increased their price targets on the stock a day after the company reported stronger-than-expected earnings.

Boeing shares rose 1.7 percent, or $1.49, to $91.05 on the New York Stock Exchange and hit a new lifetime high of $92.24.

On Nasdaq, shares of Gilead Sciences Inc. jumped 11.2 percent, or $7.21, to $71.53 after hitting a record high of $71.92.

Gilead, whose products include HIV drugs, reported earnings on Wednesday that beat Wall Street's expectations and projected sharply higher 2007 sales. Several analysts raised their price targets on the stock.

Exxon Mobil shares rose 1.3 percent, or 98 cents, to $75.08. Chevron Corp., which is expected to report results Friday, advanced 2.2 percent, or $1.59, to $74.47.

Among the biggest weights on the Nasdaq was Google, down $19.75, or 3.9 percent, at $481.75.

Google reported a 67 percent jump in gross revenue, which beat a Wall Street consensus for growth of 64 percent. But analysts said the results, released after Wednesday's close, still failed to live up to some investors' expectations.

Trading was active on the New York Stock Exchange, with about 1.70 billion shares changing hands, below last year's estimated daily average of 1.84 billion, while on Nasdaq, about 2.23 billion shares traded, above last year's daily average of 2.02 billion.

Advancing stocks outnumbered declining ones by a ratio of about 3 to 1 on the NYSE and by 2 to 1 on Nasdaq.

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