With shares of tech giant Apple (AAPL 0.50%) up more than 32% year to date, some investors might be wondering if the stock has become overvalued. After all, revenue or earnings didn't grow during this period. On the contrary, they contracted.

The stock's big gain, therefore, has been driven solely by valuation multiple expansion. Is the big move justified? Or is it time for shareholders to take some profit off the table?

Despite the stock's sharp and rapid rise this year, shares not only don't look overbought, but they arguably appear attractive.

Some context is in order

First, it's worth noting that the stock's recent gain is more of a recovery than a run-up. Put another way, the iPhone maker's shares aren't getting ahead of themselves this year; they're just recovering.

Indeed, Apple shares are still about 5% below their all-time highs. The stock's highest levels were actually more than a year ago, on Jan. 3, 2022. On this day, the stock price crossed $180.

The big thing that pulled Apple stock down leading up to its surge higher during the first half of 2023 was a broader-market decline, particularly in tech. This is evidenced by the S&P 500's 19% pullback last year and the outsize decline of the tech-heavy Nasdaq Composite, which plummeted 33% during the year. 

A compelling valuation

Recent stock price movements may provide context, but they lack the substance needed for an investor to be as informed as they need to be in order to form an opinion on whether a stock is a buy, sell, or hold. Investors should go deeper and look at Apple stock's valuation. On this front, the tech stock scores quite well.

At first glance, a price-to-earnings ratio of 29 might seem a bit excessive for a company struggling to grow revenue and earnings in recent quarters. But investors should realize that Apple is coming off of a period of extraordinary growth.

For example, though trailing-six-month revenue and earnings per share declined 4% and 6% year over year, respectively, revenue and earnings per share in the 12-month period ending one year earlier rose 10% and 18% year over year, respectively. Looking further back to the same trailing-six-month period ended two years ago, Apple's revenue grew 34% year over year, and its earnings per share skyrocketed 63%. Growth like this in the rearview mirror is difficult to trump.

Historically, volatility in the company's growth rates has been normal. Apple reported negative year-over-year growth rates in 2016 and 2019, for instance. But when zooming out to Apple's longer-term trends, the tech giant has proven it can steadily grow its top line and earnings per share.

Analysts unsurprisingly expect similar trends over the next few years. The consensus analyst forecast calls for about 7% top-line growth in both fiscal 2024 and fiscal 2025 and earnings-per-share growth rates of 9% and 11% for those same years, respectively.

The stock's valuation is also supported by robust cash flow and an impeccable balance sheet. Apple's trailing-12-month free cash flow was more than $97 billion. Strong cash flow like this has helped the company build a balance sheet with $166 billion of cash and marketable securities.

Net of its long-term debt, Apple still has $57 billion of cash remaining. With a goal for its cash position to eventually equal its debt position, the company has plenty of excess cash -- and management is putting it to work with share buybacks and dividends.

All this said, shares don't look overbought at all. Indeed, today could prove to be a good time to buy in hindsight. There are risks, of course.

Investors, for instance, will want to watch the company's financial results over the next few years to ensure that Apple once again proves it can return to growth as it has following previous slowdowns in its business. If this growth fails to materialize, shares could underperform or even decline.

But given Apple stock's fairly conservative valuation, the company's long history of execution, its strong brand, and loyal customers, there's a lot to like about the stock today.