Shares of Taiwan Semiconductor Manufacturing (TSM -0.70%) are sitting close to their all-time high, and Barclays analyst Simon Coles sees more upside in the next year. Last week, the analyst maintained the firm's overweight (buy) rating on the stock but raised their price target from $215 to $240.

Wall Street's price targets are not all that meaningful for long-term investors. But in this case, there is a meaningful catalyst that can send shares higher in the near term: TSMC has a strong growth catalyst in artificial intelligence (AI). Here's why the analyst might be right with his price target.

AI chip demand is off the charts

On the third-quarter earnings call, management said that demand for AI server processors, which include graphics processing units (GPUs) and other chips being used for AI training, is booming. It expects the revenue contribution from these chips to more than triple for the full year.

While revenue from AI chips is expected to make up a mid-teens percentage of 2024 revenue, TSMC is also seeing strong growth in other areas of the business. In the third quarter, revenue grew 36% year over year with earnings per share up 54%.

Despite the stock's recent gains, its valuation is still attractive. TSMC currently trades at 26.7 times this year's consensus earnings estimate, and using the 2025 consensus estimate, its forward price-to-earnings (P/E) ratio is even more attractive at just 21.2. That seems to be an unjustified discount to the S&P 500 index's average forward P/E of 23.9, considering TSMC's above-average revenue and earnings growth.

Of course, demand trends can sometimes change for the worse, given the cyclical nature of the chip industry. But considering the recent opportunities in the AI chip market, TSMC should deliver another year of strong growth in 2025 and beyond, making the stock a solid buy.