Demand from chipmakers for Lam Research's (LRCX 4.70%) tools drove its stock price to all-time highs by mid-January 2022. However, the stock has underperformed since reaching those highs amid labor shortages, COVID-19-related supply chain constraints, industrywide shortages, and rising logistics costs. Moreover, now that it looks like a recession is increasingly likely, some investors wonder whether they should avoid this company, since demand for its products could rapidly deteriorate.

Here are three reasons Lam looks like an excellent long-term investment at today's prices.

A worker in a chip manufacturing plant is looking at a computer screen.

Image source: Getty Images.

1. Demand for semiconductors drives Lam's results

Lam is a wafer fab equipment (WFE) manufacturer, building the machines that manufacture semiconductors. Its main customers are companies like Intel (INTC -1.13%), Taiwan Semiconductor (TSM 2.98%), and SK Hynix, to name a few.

We live in an age of accelerating innovation, and many of the newest technologies in highest demand rely on smaller and better chips, which semiconductor manufacturers can only make with Lam's advanced tools. Fortunately for Lam, its devices have few alternatives and are in high demand.

What drives that demand? According to global research firm McKinsey, three industries will drive 70% of semiconductor's future growth: automotive, computation and data storage, and wireless. As the end demand for advanced chips from those industries rises, semiconductor companies will need more of Lam's tools to build those chips -- driving its revenues and earnings higher.

2. Lam is a market leader

Since its founding in 1981, Lam has elevated itself to owning some of the market's most advanced and popular chipmaking tools. For example, its tools have cumulatively processed over 40 million more wafers than its nearest competition -- demonstrating its technological superiority. And in addition to leading its competitors in key areas, Lam has an installed base of over 75,000 systems -- a substantial competitive advantage for three reasons.

First, once a chip manufacturer decides to buy, Lam works closely with the customer to tailor its tools to the customer's chipmaking process flow. From this, it gains valuable insights on how to improve its devices.

Second, once a customer installs Lam's tools into their chipmaking process, the cost becomes prohibitive to switch to a competitor's solution.

Third, Lam has scale advantages, meaning it can use its size in the industry to negotiate the purchase of raw materials, products, and logistical services at a lower price per unit than many smaller competitors.

3. Lam makes significant improvements

Two particularly nasty problems left in the wake of the pandemic are supply chain disruptions and inflation -- complications that you can see hit Lam's gross margins in the March quarter, along with a the margins of few other WFE manufacturers.

LRCX Gross Profit Margin (Quarterly) Chart

LRCX Gross Profit Margin (Quarterly) data by YCharts

In the June quarter, the company continued to have problems managing costs in freight and logistics, semiconductors, and other critical components for manufacturing WFE tools. Management expects inflation and supply chain disruptions to persist to at least the end of 2022, so investors shouldn't expect massive improvements in gross margin this year.

However, expect improvement over the long term. Management has devoted significant resources to making the company more resistant to economic shocks. For instance, Lam has recently focused on cutting logistics costs by moving company resources closer to its suppliers and customers in the U.S. and globally. These recent supply chain improvements are one reason that despite inflationary and supply chain disruptions, Lam just concluded its second consecutive fiscal year of record revenue and diluted earnings per share (Lam's fiscal year ended on June 27).

The image describes the ways Lam has strengthened its business.

Image Source: Lam Research. 

Eventually, recent improvements will show up in improved gross margins and operational efficiencies. And the company should emerge from this period of economic disruption as a far more robust and resilient company.

Lam is selling at a fantastic valuation

As I write this, the market values Lam at a PEG ratio of 0.62, and most investors consider any company with a PEG ratio under 1.0 undervalued. Therefore, the market may have already priced in the possibility of a mild to moderate recession. And if you are an investor able to withstand some short-term market gyrations, you should consider picking up a few shares of this high-quality company today.