Alphabet Inc. and Amazon.com Inc. were rewarded by investors for reporting better-than-expected third-quarter profits. At both companies, earnings were boosted by the increased value of their stakes in Anthropic PBC, maker of the popular Claude chatbot.

Alphabet said profit included “net gains on equity securities of $10.7 billion,” in part from a private company. That company is Anthropic, according to people familiar with the matter, who declined to be named disclosing non-public information. Meanwhile, Amazon’s third-quarter profit climbed 38%, helped by a $9.5 billion pretax gain from its investment in Anthropic. The higher value was reflected in Amazon’s nonoperating income for the period, the company said in its Thursday earnings report.