Semiconductor bellwether ASML Holding (ASML 3.12%) had a forgettable 2022, with the stock slipping about 31% during the year. But the Dutch company, whose equipment is critical to the manufacturing of the advanced chips that power several applications ranging from smartphones to data centers, ended the year strongly with a nice rally.

ASML's year-end rally defied the mood of the broader stock market, which was shaped by a hawkish Federal Reserve that indicated that it will be raising rates further in 2023 to control outsized inflation. However, the forecasts issued by ASML management during its investor day (held in November 2022) may have boosted investor confidence in the stock, as the company is anticipating solid growth over the long run.

Let's see where ASML could be in three years and check if investors should be buying the stock in the wake of its recent rally.

ASML should see impressive growth over the next 3 years

ASML's 2022 guidance calls for revenue of 21 billion euros, which would be a 13% jump over its 2021 revenue. It is worth noting that the company had to contend with supply chain issues at the beginning of 2022 that kept it from fulfilling orders, otherwise it would have managed to deliver stronger growth during the year.

ASML's growth is set to accelerate in 2023 and beyond, as evident from the rapid growth in the company's order book and a massive backlog of orders. In the third quarter of 2022, ASML's net bookings hit a record 8.9 billion euros, which was a huge jump over the prior-year period's bookings of 6.2 billion euros. This clearly shows that demand for ASML's photolithography machines, which help foundries and chipmakers manufacture chips, remains strong even though semiconductor sales are weakening.

Gartner estimates that global semiconductor sales could drop 3.6% in 2023 following a 4% increase in 2022, which was preceded by a massive 26% jump in 2021. That's not surprising given the slowdown in key markets such as personal computers and smartphones. Still, ASML's machines remain in hot demand, as the huge growth in its Q3 2022 bookings figure demonstrates.

The reason why ASML's lithography equipment is highly sought after by customers is that it is the only manufacturer of machines that allow foundries and chipmakers to build chips on advanced processing nodes such as 5-nanometer (nm) and 3nm. The company's monopoly in photolithography equipment is the reason why it is in a solid position to tap into the secular demand for semiconductors in the long run.

Third-party estimates suggest that the global semiconductor industry could generate $900 billion in revenue by 2027, which would be a 50% increase over 2023's projected revenue of nearly $600 billion. Not surprisingly, ASML sees a healthy acceleration in growth in the long run. The company anticipates annual revenue of 35 billion euros in 2025 at the midpoint of its guidance range. By 2030, ASML sees its top line landing at 52 billion euros at the midpoint of its guidance of 44 billion euros to 60 billion euros.

So the company anticipates a big jump of 67% in its top line over the next three years compared to 2022. That translates into a compound annual growth rate (CAGR) of 18.5% over the next three years. More importantly, the company expects its gross margin to increase to 55% in 2025, compared to a 2022 estimate of 50%.

As a result, ASML's impressive top-line growth should also translate into a nice increase in earnings. Analysts anticipate ASML's earnings to increase at a CAGR of nearly 30% over the next five years. Assuming the company maintains this growth over the next three years, its earnings could increase to $31.50 per share in 2025, compared to this year's estimate of $14.34 per share.

Why the stock is a solid buy right now

ASML stock is trading at 36 times earnings right now. While that's expensive compared to the Nasdaq-100's earnings multiple of 24, ASML's valuation seems justified given its dominant position in its industry, as well as the impressive growth it is promising in the long run.

Investors should also note that ASML is trading at a discount to its five-year average earnings multiple of nearly 41. It has a forward price-to-earnings ratio of 27, which points toward a nice improvement in the bottom line. Assuming ASML's forward earnings multiple remains at 27 after three years and it can hit the earnings estimate calculated above, its stock price could increase to $850 in three years, which represents a 55% upside from current levels.

So investors still have a chance to buy ASML at a relatively attractive valuation -- and they may not want to miss this opportunity, as this semiconductor stock could deliver solid long-term upside.