What happened

Shares of Texas Instruments (TXN 0.01%) rose 14.8% in 2021, according to data from S&P Global Market Intelligence. The world's largest producer of analog chips rose amid 2021's chip shortage, but it may be surprising that it didn't finish ahead of the S&P 500 or even its own sector.

Two factors likely caused the relative underperformance: Texas Instruments' status as a fairly defensive stock relative to its peers, along with it being one of the leading culprits behind the global chip shortage, which caused it to miss expectations in its third-quarter earnings report.

TXN Chart

TXN data by YCharts.

So what

Texas Instruments has a very long history of success, and has positioned itself as the leading global supplier of analog and embedded chips, with a market share around 20%. In general, these aren't the most cutting-edge chips made on advanced nodes. But they are absolutely crucial to producing all sorts of devices, from mobile phones to automobiles.

Based on its scale and opportunistic purchases of manufacturing plants when prices were low, Texas Instruments generates massive margins. Operating margins came in at more than 47% over the past 12 months.

With this advantage, Texas Instruments is known as a defensive haven in the somewhat cyclical semiconductor industry. So, emerging from the pandemic, it wasn't as cheap as many of its rivals. Starting from a higher valuation multiple around 30 times earnings entering 2021, it didn't leave quite as much room for upside as its peers had. In fact, its price-to-earnings ratio has come down to around 24, even as its earnings surged.

TXN PE Ratio Chart

TXN PE ratio data by YCharts.

In addition, though Texas Instruments saw red-hot double-digit revenue growth in 2021, it didn't grow as much as it could have because it was supply constrained. In fact, a lot of the world's leading technology companies pointed the finger at Texas Instruments specifically for being a main culprit behind the global chip shortage this year. If an automaker or phone producer can't get TI's chips, even if they're lagging-edge chips that cost only a few dollars, it can hold up production for the entire device.

Remember that 2019 saw an industrial recession in auto and manufacturing, two main segments for Texas Instruments. In response, TI didn't invest in a lot of new capacity, and was caught off guard amid this year's boom in chip demand.

It can take one to two years to bring a new plant, or "fab," on line, and while Texas Instruments is in the process of bringing much more capacity on line, its new Texas fab likely won't be available until the middle of 2022, with another in Utah coming on line in early 2023.

A semiconductor embedded  on a printed circuit board.

Image source: Getty Images.

Now what

Despite its 2021 underperformance, Texas Instruments remains a very attractive stock, especially for defensive investors looking for dividends and stability. Although the semiconductor space can be volatile, demand should stay strong through this year and perhaps beyond. TI's P/E ratio has now come down to a more reasonable level around 24, its dividend pays a healthy 2.6%, and earnings should grow for the foreseeable future.

TI's business is diversified, but it has made big bets on auto and industrial applications, which appear to be booming right now as cars and manufacturing plants become smarter as time goes on. That growth outlook and TI's history of shareholder returns via dividends and repurchases make it an attractive candidate to anchor any portfolio, for investors young or old.