When Anthropic goes public this month in what is expected to be one of the biggest initial public offerings in history, it will mint billionaires and flood its hometown, San Francisco, with new wealth.

But some of the biggest beneficiaries will be tech industry giants that are already worth trillions of dollars. Amazon and Google invested in Anthropic and are its largest outside shareholders, together owning more than a quarter of its shares.

If Anthropic’s I.P.O. goes as it hopes, the company will be worth as much as $1.4 trillion. Amazon’s $18 billion investment could balloon to be worth more than $250 billion, and Google’s $33 billion into $140 billion.

The size and sheer speed of the gains are without parallel in the history of corporate venture investments. And they reflect a paradox of the artificial intelligence boom: While start-ups are at the forefront of A.I. development, the industry’s biggest companies have profited the most from demand for the technology.

Gil Luria, a tech analyst at the investment bank D.A. Davidson, estimated that more than $1 trillion in market capitalization — largely from providing the start-up cloud computing and offering its A.I. to their customers — for each of the companies was a direct result of their relationship with Anthropic.

A.I. is “an extraordinarily unusual opportunity to forever change the size” of Amazon, Andy Jassy, the company’s chief executive, told investors this year.