Stock markets were mixed at midday on Tuesday, as investors came back from the Memorial Day weekend feeling upbeat about technology stocks but worried about the broader economy. Declines for the Dow Jones Industrials offset gains in the Nasdaq Composite to leave the S&P 500 near the unchanged mark early Tuesday afternoon.

Many market commentators have noted that the bulk of the gains in the major indexes has come from a handful of big stocks. You won't find a bigger stock than Apple (AAPL 0.52%), as its market capitalization rose to nearly $3 trillion in early 2022. Yet even as other stocks make their push toward trillion-dollar market-cap status, Apple is dealing with a headwind in its efforts to retrace its record run -- and it has only itself to blame. Here's why.

Apple is on the rise

Shares of Apple were higher by between 1% and 2% early Tuesday afternoon. Earlier in the morning, shares of the iPhone maker had risen to $179 per share, their best level in more than a year.

The move upward for Apple stems from a number of factors. Excitement about its multibillion-dollar agreement with semiconductor chipmaker Broadcom (AVGO 2.99%) was one positive sign, as the supply agreement to obtain various 5G radio frequency components and other wireless connectivity products will help Apple maintain its superiority in its wireless devices. In particular, by reducing its reliance on Chinese companies to provide supplies of crucial parts and components, Apple expects that it will be positioned to handle any future supply chain problems more effectively than it did during the worst of the pandemic.

Also, artificial intelligence (AI) has been an emerging theme among companies in the tech realm. To a large extent, Apple has been quiet about its own AI plans, preferring instead to let other companies be more public with their proposals in the space.

Yet few investors believe that Apple will stand by and let other companies dominate the AI industry. On many occasions in the past, Apple has chosen not to be the first mover, instead coming in later and releasing products that avoid the steepest part of the learning curve while offering unique features.

Further away from a record market cap

At its highs early Tuesday, Apple's share price was just below its record close of $182 per share in January 2022. That left the company with a market capitalization just under the $3 trillion mark, although it had briefly climbed above the $182.86 per share necessary to surpass that level during the trading session on Jan. 3. So with the stock now about 2% below that mark, it might seem as if breaching $3 trillion once again would be inevitable.

Yet that isn't the case. In order to reach a $3 trillion market cap, Apple stock would have to climb to nearly $190 per share. That's not a huge move, but it's still more than 6% above the $179 price.

The reason for this is that Apple has consistently repurchased shares. As of April 1, the company had about 15.79 billion shares outstanding. That was down from the 16.39 billion shares outstanding as of Dec. 25, 2021, immediately before the record run to $3 trillion. Those 600 million shares represented tens of billions of dollars of stock buybacks that Apple has made in just the past 15 months.

Don't count Apple out

Just because it'll take a little bit more effort doesn't mean that Apple is doomed not to get back to a $3 trillion market cap. If the business remains strong, then it's completely reasonable that the stock could rise another 6%.

The point, though, is that even as many companies continue to issue new shares, Apple has cut its outstanding share count significantly year after year. That keeps it from having as large a market cap as it could, but it makes each share that much more meaningful for shareholders as time passes.