Lenovo, which used to be the world's largest PC maker but lost the crown to HP, lost $72 million compared with a profit of $173 million for the same period last year.
It was the company's first quarterly loss since September 2015 and lagged analysts' average forecast of a $5.29 million profit, sending the stock down as much as five percent to a year low.
The outlook for the rest of the year also pretty miserable as as component shortages would drive costs higher, possibly forcing the company to raise its selling price to protect margins, executives said.
Lenovo Chief Operating Officer Gianfranco Lanci said on an earnings call that most of the component cost is stabilising except memory and the price of that is still going up.
Memory prices rises would continue "at least until the end of the year", albeit at a slower rate than the past two quarters, he said, a product of exploding global demand for semiconductors.
Auto industry demand was also pushing up the price of batteries, he said.
While personal computer makers around the world are struggling as consumers switch to mobile devices, Lenovo's core PC business is declining more rapidly than many of its competitors.
Lenovo posted a six percent decline in PC shipments in the quarter, compared with a three percent fall globally. Its PC revenue was flat at $7 billion.
"Overall, it will be very challenging for them to improve their PC performance in the short-term with the component price rise that's here to stay", said analyst Mo Jia, of industry consultancy Canalys.
Chairman and Chief Executive Yang Yuanqing was upbeat about the prospects for margins and the struggling mobile business.
He pointed to a $110 million sequential improvement in operational pretax income, which he attributed to improvement in the mobile and data center businesses.
"Not only did this gave me more confidence we will turn around our mobile business in the second half of FY2018, I think the entire Lenovo is entering a new phase of growth", he said.
Lenovo has struggled with mobile since acquiring Motorola in 2015, and as Chinese rivals such as Huawei and Xiaomi leapt to global prominence.
Losses from its mobile business narrowed and revenue rose twopercent to $1.75 billion in the quarter. It was the only unit to post a rise in revenue, although it still accounted for just 17 percent of the total. Total revenue was flat at $10 billion.
To protect margins, Yang said Lenovo would focus more on fast growing premium products such as PCs tailored for gaming and millennials.
It had dropped low margin deals such as that with Google's Chromebook, and would raise selling prices if component costs continued to climb.
Lenovo's data center business group recorded an operational loss of $114 million, versus a loss of $31 million a year ago. Despite a 11 percent drop in revenue, Yang said he expected the group to turn profitable in two years.