Tech stocks returned to favor this year after the market suffered a dramatic sell-off in 2022. Many of the industry's companies have enjoyed solid recoveries as advances in sectors like artificial intelligence (AI) and virtual/augmented reality (VR/AR) have created bullish investors. 

As a result, companies pushing these markets forward, such as Apple (AAPL -0.82%) and Advanced Micro Devices (AMD -0.17%), are increasingly attractive investments. These businesses suffered considerable stock declines in 2022. However, shares in Apple and Advanced Micro Devices (AMD) have soared since Jan. 1 and will likely continue on their current trajectory over the long term. 

Apple is a compelling buy with its dominance in consumer tech. And AMD's powerful chips allow it to profit from growth across multiple industries. But before you add these tech giants to your portfolio, it's a good idea to make the most of your investment by finding out which is currently the better buy. So, let's take a closer look.

Apple

Apple's biggest selling point is the reliability of its established business. The company became a household name worldwide, known for its quality products and sleek, innovative designs. Using Apple products has become almost a status symbol in many countries, increasing demand and allowing the company to deliver consistent revenue growth despite its prices being on the higher end of the market. 

The biggest growth driver is easily the iPhone. The popular smartphone is responsible for more than 50% of the company's revenue and is a lucrative tool for attracting consumers to its other products. Apple can easily tout its other devices and services through the iPhone, bolstering its earnings.

The company's booming services business is one of the biggest winners from this strategy. Digital platforms like Apple TV+, Music, Fitness+, News+, and more now comprise the company's second-highest-earning segment.

The subscription-based business strengthens Apple's outlook by diversifying its earnings and providing attractive profit margins. In fiscal 2022, services hit a profit margin of 72%, while the same metric for products came to 36%.

As a result, Apple's immense brand loyalty could lead to a fruitful future in the VR/AR market after the debut of its new headset, the Vision Pro. If future generations of the device can launch at more competitive pricing, iPhone users could significantly boost Apple's market share in this high-growth sector. 

AMD

Advanced Micro Devices has captured Wall Street's attention this year, with its stock climbing 66% year to date, almost entirely driven by its prospects in AI.

The company is home to a diverse line of chips, including graphics processing units (GPUs), data processing units (DPUs), and central processing units (CPUs), making it one of the few companies producing the hardware necessary to run and develop AI models.

The semiconductor company's potential has also caught the eye of some of tech's most prominent players. Microsoft, the biggest investor in ChatGPT developer OpenAI, is reportedly supporting AMD's AI chip expansion by providing financial and engineering resources. And Reuters recently reported that Amazon Web Services is considering using AMD's chips after previously relying on Nvidia for the majority of its hardware needs. 

AMD's diverse range of chips allowed it to expand to several other markets. The company's hardware can be found powering a wide range of devices and services, including game consoles, laptops, custom-built PCs, and cloud platforms like Azure and Alphabet's Google Cloud. 

As a leading chipmaker, AMD is fueling the development of several industries, making its stock an increasingly attractive investment. 

Is Apple or AMD the better buy?

While Apple and AMD are both compelling options, it's often better to choose the more reliable stock to minimize risk. In this respect, Apple is the clear winner. 

AMD Price to Free Cash Flow Chart

Data by YCharts. PE = price to earnings.

The chart above illustrates how Apple is the better value with its price-to-earnings ratio and price to free cash flow significantly lower than AMD's. The iPhone company has a proven track record of consistent growth over the long term, with its stock hardly ever seeing dramatic peaks and valleys.

For instance, amid 2022's economic downturn, Apple shares declined about 27%. Meanwhile, the same 12 months saw AMD's shares plunge 55% as its business proved more vulnerable in the challenging year. 

Apple's reputation for consistent growth and almost unrivaled brand loyalty makes it the better and more reliable buy.