(Reuters) - Intel Corp (>> Intel Corporation) raised its quarterly revenue forecast for the first time in more than two years as suppliers of parts used in personal computers replenish their inventory amid improving PC demand.

Shares of the world's largest chipmaker rose as much as 4.1 percent to a more than 15-year high of $38.05 on Friday.

Intel, which helped found the personal computer industry, has been struggling as tech users shift away from PCs to mobile phones for their computing needs.

Sales in the company's PC business declined 3 percent to $7.3 billion in the latest quarter. The unit includes sales of chips for mobile phones and tablets.

However, there have been signs PC demand may be recovering.

HP Inc (>> HP Inc), which houses the hardware business of the former Hewlett-Packard Co, said last month that revenue in its computer business rose 7.5 percent in the third quarter from the second as sales of notebooks improved.

FBN Securities analyst Shebly Seyrafi said commentary from Intel and HP suggested that PCs were "not as dead as people were thinking."

Research firm IDC said in July global PC shipments fell less than expected in the second quarter, helped by strength in the United States.

"We expect PC units to decline less than the high-single-digit decline consensus in 2017, driven by continued Windows 10 upgrades and accelerating SSD adoption, along with new form factors," Baird Equity Research analyst Tristan Gerra wrote, raising his price target to $42 from $40.

Intel said on Friday it expected third-quarter revenue to be $15.6 billion, plus or minus $300 million, compared with its prior forecast of $14.9 billion, plus or minus $500 million.

That implies the highest-ever quarterly revenue for Intel, according to Thomson Reuters data.

Analysts on average were expecting $14.90 billion, according to Thomson Reuters I/B/E/S.

RBC Capital Markets analyst Amit Daryanani said the pre-announcement was a good first step to the PC story stabilizing at Intel, and raised his price target by $2 to $38.

Shares of rival Advanced Micro Devices Inc (>> Advanced Micro Devices, Inc.) were up about 1 percent, while those of Micron Technology Inc (>> Micron Technology, Inc.) and HP were marginally higher.

Shares of Santa Clara, California-based Intel were up 2.6 percent at $37.53 in afternoon trading.

Up to Thursday's close, the stock had risen 6.1 percent this year, underperforming the 20.8 percent gain in the broader Philadelphia SE Semiconductor Index <.SOX> during the period.

(Reporting by Narottam Medhora and Arunima Banerjee in Bengaluru; Editing by Sriraj Kalluvila)

By Narottam Medhora