Everyone knows that Apple Inc. (AAPL) - Get Report stock has been a great investment for those who have held onto it, but they may not have known how insanely great it's been. 

It turns out that since 1926, the tech giant has generated more profit for investors than any other U.S. company, according to a study of stock market returns by Arizona State University, as reported by the New York Times. The study, carried out by finance professor Hendrik Bessembinder, uses 1926 as a starting point because that's the first year that stock price data was ever recorded by the University of Chicago's Center for Research in Security Prices, a database that tracks all publicly-traded stocks in the U.S. 

In just under 40 years, Apple, which began trading publicly in 1980, has created more than $1 trillion in net wealth for investors (Bessembinder calculates net wealth creation as total stock returns in excess of one-month Treasury returns, which have averaged 3.38% on an annualized basis since 1926). That $1 trillion figure pushes Apple past Exxon Mobil Corp. (XOM) - Get Report , the previous chart-topper. The oil giant has generated about $910 billion in investor profit, dropping from $1 trillion last year. Exxon Mobil's stock has fallen 10.7% so far this year as oil prices continue to slide.

Exxon's loss has been Apple's gain. The Cupertino, Calif.-based company has had an incredible run this year, with the stock up more than 30% so far. In May, Apple became the first company to reach an $800 billion market cap, just two years after it crossed the $700 billion threshold. The stock rally has largely been powered by growing enthusiasm about Apple's latest generation of iPhones, which many believe could power another sales super cycle akin to the iPhone 6 release, when Apple's stock rose about 30% at the height of the iPhone 6 cycle. 

Fellow tech giant Microsoft Inc. (MSFT) - Get Report came in as the third-greatest wealth creator, generating about $700 billion for investors. 

Apple has surged far above its competitors in terms of wealth creation, but some of its rivals actually outrank it on annualized stock returns. Amazon.com Inc. (AMZN) - Get Report , which only went public in 1997, has had an annualized return rate of 37.4% from then until 2016. Of the 50 companies measured in the study, Amazon already ranks 14th in terms of net wealth creation for investors.

Close behind Amazon in annualized return is Facebook Inc. (FB) - Get Report , with a figure of 34.5%. Facebook is also the youngest company to make the list, having become a publicly traded company in 2012. Alphabet Inc. (GOOGL) - Get Report , the third-youngest company in the study, has had a 24.9% annualized return rate. 

Although Apple and other Silicon Valley giants have made investors rich, Bessembinder's report notes that most stocks aren't good investments at all, with many generating returns more meager than those of one-month Treasury bills. The study concluded that just 30 stocks account for 30% of the net wealth generated by stocks as a whole in the past nine decades, according to the Times.

Facebook, Apple and Alphabet are holdings in Jim Cramer'sAction Alerts PLUS Charitable Trust Portfolio. Want to be alerted before Cramer buys or sells FB,AAPL or GOOGL? Learn more now.

More of What's Trending on TheStreet: