For nearly 20 years, some of the world’s biggest investors quietly bought stakes in SpaceX while the rocket company remained out of reach for most people. Now, those early bets are paying off in a huge way.

With Elon Musk’s SpaceX heading for an initial public offering (IPO) at a valuation of about $1.8 trillion, several investors are set to see some of the biggest gains ever recorded in venture capital.

Among those expected to benefit the most are veteran investor Ron Baron, Cathie Wood’s Ark Invest, Fidelity Investments, venture capital firms such as Founders Fund, Sequoia Capital and Andreessen Horowitz, as well as hedge funds including D1 Capital Partners and Coatue Management. A number of pension funds and university endowments are also expected to share in the gains. 

Peter Theil’s Founders Fund’s stake grows to more than $50 billion 

One of the biggest winners is Founders Fund, the venture capital firm led by Peter Thiel, who is also a longtime friend of Musk. The firm invested about $600 million in SpaceX through multiple funding rounds spread over nearly two decades. In return, it built a stake of roughly 3% in the company. 

At SpaceX’s IPO price of $135 per share, that holding is now worth more than $50 billion, according to Bloomberg. The investment has become one of the most successful bets in the firm’s history.

Andreessen Horowitz headed for its biggest payday 

Andreessen Horowitz is also set to score a historic win from the IPO. According to a person familiar with the matter, the venture capital firm’s SpaceX investment is now worth more than $10 billion. The return is expected to be the largest in the company’s history. 

The firm has backed many of Silicon Valley’s biggest success stories over the years, but none are expected to match the gains it is about to see from SpaceX. 

Sequoia turns late investment into a $20 billion-plus stake 

Sequoia Capital joined the SpaceX story later than some of the company’s earliest supporters. The company made its first investment at the end of 2019. 

According to Bloomberg, Sequoia owns about 1.5% of SpaceX, a stake now worth more than $20 billion. The venture firm has invested roughly $2 billion in SpaceX over the years. That figure includes the $800 million it invested in X (formerly Twitter).

Antonio Gracias’ Valor Equity’s stake approaches $70 billion 

Another major beneficiary is Valor Equity Partners, the investment firm founded by Antonio Gracias, a longtime Musk ally. According to SpaceX’s IPO filings, Valor owns roughly 4% of the company. At the IPO valuation, that stake is worth nearly $70 billion, making it one of the largest holdings among SpaceX investors.

DFJ Growth and 137 Ventures also score huge gains 

DFJ Growth, which has backed several Musk-founded businesses over the years, is also set for a substantial payout. The firm has invested more than $800 million in SpaceX and owns at least 2% of the company, according to a Bloomberg analysis. That stake is now worth at least $35 billion.

Another early supporter, 137 Ventures, owns about 1% of SpaceX. 

Ron Baron turns a $2 billion investment into a $12 billion stake 

One of the biggest winners is Ron Baron, who first invested in SpaceX in 2017 through employee share sales when the company was valued at less than $22 billion.  Since then, Baron has taken part in 27 funding rounds.

By the end of March, SpaceX made up 33% of the assets in the $10.4 billion Baron Partners Fund and 25.5% of the Baron Asset Fund, which made it one of the most important investments.

According to Baron, his firm has invested around $2 billion in SpaceX over the years. That investment has now grown to roughly $12 billion. 

Fidelity’s early bet pays off 

Few traditional asset managers have benefited from SpaceX’s rise as much as Fidelity Investments. The Boston-based investment giant got involved early through former portfolio manager Gavin Baker, who started buying SpaceX shares in 2015 when the company was valued at around $10 billion. 

As of March 31, SpaceX accounted for 4.7% of the $177 billion Fidelity Contrafund, one of the largest actively managed mutual funds in the world.

The company also made up 3.3% of the $103 billion Fidelity Blue Chip Growth Fund and 2.6% of the nearly $99 billion Fidelity Growth Company Fund, according to CNBC.

Some investors could earn even more in the future 

For a few investors, the gains from SpaceX may not stop with the IPO. One example is Thrive Capital, which first invested in the company when SpaceX was valued at just $38 billion.

Thrive and Andreessen Horowitz are also major investors in Cursor, the artificial intelligence coding startup that SpaceX is expected to acquire for $60 billion later this year.

If the deal goes through, Thrive’s combined exposure through its direct SpaceX investments and its holdings in Cursor could be worth about $10 billion, according to Bloomberg. That means some investors who were already celebrating massive gains from the IPO could see their fortunes grow even further in the months ahead.

SpaceX, formally known as Space Exploration Technologies, is expected to begin trading on Friday after raising $75 billion in what has become the largest IPO of all time.