A $7.3 billion accounting charge pushed General Motors into a $3.9 billion net loss for 2017, but without the expense the company posted record per-share earnings.

Excluding one-time items, GM made a $9.9 billion profit, or $6.62 per share, the highest since leaving bankruptcy in 2009. The earnings beat Wall Street estimates. Analysts polled by FactSet expected $6.33 per share. Full-year revenue was $145.6 billion, which also beat estimates.

GM says the change in the U.S. tax code forced it to write down accumulated losses that it uses to avoid corporate income taxes. Assets fell from $33.6 billion, to $24 billion. Since the rate fell from 35 percent to 21 percent, the losses are worth less.

About 50,000 GM factory workers will get $11,750 profit-sharing checks late this month, based on a full-year pretax North American profit of $11.9 billion.

Chief Financial Officer Chuck Stevens said GM still expects economic growth this year even with a possible 0.75-point increase in the prime interest rate. He says credit availability is still strong, interest rates are relatively low, and he expects wage growth and more disposable income from tax reform. "We are constructive that 2018 will be another strong year both globally and in the U.S.," he said. "We are not overly concerned at this point around some of the discussion around inflation that we've seen. We think overall the macro environment is and will remain constructive."

For the fourth quarter, GM posted a $5.2 billion net loss due to the accounting charge. Without charges, the company made $2.4 billion, or $1.65 per share, soundly beating analyst estimates of $1.39. Fourth-quarter revenue was $37.7 billion, which also beat analyst estimates.

Shares of GM rose 1.2 percent to $40.01 in premarket trading Tuesday. They have fallen 5.7 percent so far this year.