Oct 21 (Reuters) - Shares of Intel Corp sank on Thursday as the company reported third-quarter sales that missed expectations, with Chief Executive Officer Pat Gelsinger telling Reuters that shortages of ancillary chips needed to make full computers are holding back sales of the company's flagship processor chips.

The company's leaders also said that margins will be lower for several years and that it will spend heavily to revamp its chip factories. Shares of Santa Clara, California-based Intel, the world's biggest maker of central processors at the heart of PCs and data center servers, fell 9% in extending trading.

Gelsinger said Intel has resolved shortages facing its own internal manufacturing operations, but that shortages of other chips such as power management chips and WiFi chips were stopping its customers from shipping PCs and servers, reducing the need for Intel's chips.

"That's a direct result of the overall supply challenges of the semiconductor industry," Gelsinger told Reuters in an interview.

Gelsinger's plan to remake the company by fixing its internal manufacturing issues while opening its doors to outside customers has largely gone over well with investors, with shares rising about 11% this year before Thursday's results.

Giving an unexpected long-range forecast on an investor call Thursday, Intel said that it expects at least $74 billion in revenue in 2022, higher than analyst estimates of $73 billion. But the company also plans to spend heavily, saying that capital expenditures could be $25 billion to $28 billion in 2022 and higher in subsequent years.

On an operational level, Intel said gross margins are likely to be between 51% and 53% in the next two to three years, below the 56.2% that analysts expect for 2021, according to Refinitiv data.

Meanwhile, rivals like Nvidia Corp and Advanced Micro Devices who make faster chips by leveraging outside contract manufacturers are continuing to eat into Intel's market share.

Intel missed estimates for its data center segment, with sales of $6.5 billion compared with estimates of $6.6 billion, according to Refinitiv data. Gelsinger told Reuters some of the data center results were because of Chinese cloud computing vendors - major customers of Intel - adjusting to new rules from the Chinese government.

Atlantic Equities analyst Ianjit Bhatti said the lower sales to cloud computing groups reflected market share gains by AMD. Shares of AMD and Nvidia were up slightly after Intel's results.

Intel reported adjusted sales for the third-quarter ended Sept. 25 of $18.1 billion, missing estimates of $18.24 billion, according to IBES data from Refinitiv. Intel reported adjusted profits of $1.71 per share, compared with Wall Street estimates of $1.11 per share, according to Refinitiv data.

Intel Chief Financial Officer George Davis, who Intel said on Thursday will retire in May 2022, said about 14 cents of the outperformance came from demand for higher-margin products and operational gains, while the rest came from one-time items like tax restructuring.

Intel forecast fourth-quarter revenue slightly above Wall Street expectations. The company expects fourth-quarter revenue of about $18.3 billion, compared with analysts' average estimate of $18.25 billion, according to IBES data from Refinitiv. (Reporting by Chavi Mehta and Tiyashi Datta in Bengaluru; Editing by Maju Samuel and Richard Pullin)