Shares of iPhone-maker Apple (AAPL 5.98%) have been on a tear recently. The stock has gained 19% over the past 30 days. This obliterates the S&P 500's 0.3% gain over this same time frame.

With the tech stock rising so sharply, some investors may think they have missed out. But investors shouldn't brush off this stock idea too easily. Shares still look attractive today -- even after their sharp gains.

Apple's new store in Germany.

Image source: Apple.

A quality business

Investors who take time to look into the fundamentals of Apple's business will quickly realize that there's a lot to like. Circling back to the company's most recent earnings report, Apple demonstrated soaring revenue and earnings per share. Revenue in the period jumped 29% year over year to $83.4 billion, and earnings per share increased from $0.73 in the year-ago period to $1.24. Further, Apple saw record revenue in every one of its geographic and product segments.

"The combination of our record sales performance, unmatched customer loyalty, and strength of our ecosystem drove our active installed base of devices to a new all-time high," said Apple CFO Luca Maestri in the company's earnings release.

This financial performance was particularly impressive given the current supply-constrained operating environment. Management said that revenue would have been $6 billion higher during the period if it wasn't for silicon shortages and COVID-related manufacturing disruptions.

Investors should also note the shareholder-friendly ways that Apple is deploying its net cash position of $66 billion and its annualized free cash flow of $93 billion. Apple returned about $24 billion to shareholders during its fiscal fourth quarter, with $3.6 billion of this sum going to dividends and $20 billion to open-market purchases of its stock. By repurchasing shares, of course, Apple is reducing its total share count and increasing the stake of each share in its business.

A conservative valuation

With financials like this, investors might expect that Apple stock's valuation is very pricey. But even after the shares' recent 19% gain, that's not the case.

The stock's price-to-earnings ratio today is 32. Consider that's not much higher than McDonald's -- a company with trailing-12-month revenue that is below where it was in 2016 and 2017. Further, Apple trades at a similar price-to-free cash flow ratio as McDonald's, with the tech giant's coming in at 32 and the fast-food chain's at 30.

Given Apple's long history of strong pricing, customer loyalty, and ability to launch new products and services that become meaningful contributors to its business over time, Apple's current valuation is not only conservative, but perhaps even cheap.