DETROIT — Ford Motor Co. on Thursday said fourth-quarter net income jumped to $12.3 billion from a $2.8 billion loss a year earlier, despite continued production and inventory struggles stemming from the ongoing semiconductor shortage.

The profit includes an $8.2 billion gain from Ford’s investment in Rivian, the EV maker that went public in November, though Ford was in the black for the quarter even without that and other one-time items.

The automaker reported adjusted earnings of $2 billion before interest and taxes, a 19 percent increase from the same period a year earlier.

Revenue in the quarter rose 5 percent to $37.7 billion.

For the full year, the automaker reported net income of $17.9 billion, up from the $1.3 billion loss it incurred in 2020, the first year of the coronavirus pandemic. It posted adjusted EBIT for 2021 of $10 billion, roughly four times its 2020 earnings on that basis and in line with its estimates after it reclassified a first-quarter Rivian investment gain.

Ford’s full-year earnings included a $7.4 billion profit in North America. Under its contract with the UAW, workers will receive profit-sharing checks of $7,377 on average in the coming weeks.

The automaker lost money in every other region except the International Markets Group, where it made $622 million.

Ford on Thursday projected that its adjusted EBIT would rise between 15 percent and 25 percent in 2022, to a range of $11.5 billion to $12.5 billion. It expects volumes to increase between 10 and 15 percent.

CFO John Lawler said the high end of that EBIT range would imply an adjusted-EBIT margin of 8 percent, including 10 percent in North America. If Ford hits that target, it would be a year ahead of schedule.

Ford’s shares slipped nearly 5 percent to $19 in after-hours trading.

Lawler attributed the tepid Wall Street response to a disappointment its volumes weren’t higher.

“Some thought we could do much better on the volumes,” he said. “But due to the supply constraints we realized due to omicron and semiconductor shortages, we weren’t able to exceed the volumes we had guided.”

Still, he said the company was in a strong position.

“Look at where we’re guiding in 2022,” he said. “It shows the strength and the momentum of the business.”