Honeywell (HON) revealed on Friday it swung to a stronger-than-expected profit in the fourth quarter as the diversified manufacturer benefited from better margins and fewer pension expenses.

Shares of the maker of everything from aviation products to thermostats jumped almost 2% on the earnings beat.

Honeywell said it earned $251 million, or 32 cents a share, last quarter, compared with a loss of $310 million, or 40 cents a share, a year earlier.

The company benefited from lighter mark-to-market pension expenses, which fell to 78 cents a share from $1.45 a share the year before.

Excluding one-time items, the Honeywell said it earned $1.10 a share, compared with $1.05 a year earlier and a penny higher than the Street’s view of $1.09.

Revenue inched up 1.1% to $9.58 billion, narrowly topping consensus calls from analysts for $9.51 billion. Profit margins expanded to 15.6% from 15.1% the year before.

Honeywell CEO Dave Cote said his company enjoyed a “terrific performance” in 2012 despite a “weak global economy.”

“Our balanced mix of long- and short-cycle businesses and expansion in high growth regions has offset lower demand in some of our short-cycle businesses, European weakness, and foreign exchange headwinds,” Cote said in a statement.

Honeywell relieved shareholders by reaffirming its projections for 2013 non-GAAP EPS of $4.75 to $4.95 on sales of $39 billion to $39.5 billion. By comparison, Wall Street analysts are calling for EPS of $4.92 to $39.34 billion.

For the current quarter, Honeywell projected revenue would be flat to up 2%, translating to $9.3 billion to $9.5 billion. Earnings are seen rising 6% to 11% to $1.10 a share to $1.15.

Honeywell’s fourth quarter was driven by an 8% year-over-year leap in sales for performance materials and technologies to $1.55 billion and a 3% gain in automation and control solutions revenue to $4.17 billion.

On the other hand, Honeywell’s transportation systems revenue dropped 11% year-over-year to $844 million, while aerospace sales dipped 1% to $3.02 billion.

Shares of Morristown, N.J.-based Honeywell gained 1.63% to $69.35 ahead of Friday’s opening bell, putting them on track to build on their 7.5% rally so far this year. Honeywell has also jumped 19% over the past 12 months.

Follow Matt Egan on Twitter @MattMEgan5