3M saw its sales increase 9 percent in the fourth quarters, but its earnings were down significantly due to the new tax law signed into law in December, the company said.

The tax law, however, prompted Maplewood-based 3M to raise its guidance for 2018.

Earnings for the quarter were $525 million, or 85 cents a share, down from $1.2 million, or $1.88 a share, in the same period a year ago.

Adjusted earnings, excluding the tax expense, were up 11.7 percent to $2.10 a share. That topped the $2.03 a share consensus estimate expected by Wall Street analysts polled by Zacks Investment Research.

“3M’s fourth quarter was marked by record sales, expanded margins and robust organic growth across all business groups and geographic areas,” said 3M President and CEO Inge Thulin in a statement. “Our team’s performance capped a successful year for our enterprise. For 2017, we posted organic growth of 5 percent, along with healthy earnings, cash flow and return on invested capital.”

The company’s biggest unit, Industrial, posted sales of $2.7 million, up 6.9 percent from the same quarter last year, and operating income of $527 million, which was down 5.5 percent.

3M said it now expects 2018 earnings to be in the range of $10.20 to $10.70 a share, up from its previous estimate of $9.60 to $10. The company expects its tax rate to be 20 to 22 percent, down from 26 to 27 percent.

“Over the last several years, we have accelerated investments in the business — including stepping up research and development and our commercialization efforts — which is evident in our strong results,” Thulin said. “Going into 2018, we will increase investments further, and are positioned to continue generating premium value for our customers and premium returns for our shareholders.”

The stock was trading up a few percentage points in early trading.