What happened

Taiwan Semiconductor Manufacturing (TSM -3.45%) reported mixed fourth-quarter results today and warned that weak demand for computer chips is likely to continue into the new year. Investors were disappointed, sending shares down as much as 2.4% on Friday morning.

So what

There was a lot to like about Taiwan Semiconductor's most recent quarter. The world's largest contract chipmaker (known as TSMC for short) earned $1.82 per share in the fourth quarter, topping the $1.77 consensus, and posted a net profit margin of 47.3% in the period. Advanced technologies, the smallest and most powerful category of chips, accounted for 54% of total wafer revenue.

But revenue of $19.93 billion was shy of the consensus $20.56 billion estimate, and down 1.5% year over year. Semiconductors have historically been a cyclical sector, and demand for chips has been slow as TSMC customers watch closely to see if the economy is softening.

The company doesn't expect conditions to improve anytime soon. It expects revenue in the current quarter to come in between $16.7 billion and $17.5 billion, short of the $17.71 billion consensus estimate. Profit margin in the quarter is expected to come in between 41.5% and 43.5%.

"Entering 2023, we continue to observe softness in consumer end-market segment where [research and development] end-market segments such as data-center-related have softened as well," C.C. Wei, the company's CEO, said during a conference call with investors.

Now what

This is a period of transition for TSMC and its customers. Wei said he expects supply chain inventory to "reduce sharply" in the first half of 2023, "to rebalance to a healthier level."

There is risk to this forecast. If the economy deteriorates significantly in the months to come, the odds of a second-half rebound in chip demand go down.

But the long-range trajectory remains promising. As everything from home appliances to automobiles becomes smarter, the need for chips is accelerating. And TSMC is at the forefront of a trend to on-shore semiconductor manufacturing, with two new advanced foundries planned in Arizona.

The bottom line is that while the coming quarters could be choppy, the long-term outlook is strong. For those with the patience to ride out the current cycle, a stock sell-off could be an intriguing buying opportunity.