SAN FRANCISCO (AP) -- Business is booming at Google's parent company, Alphabet Inc., even as it loses billions of dollars on kooky-sounding projects that may never produce any revenue.

Powered by Google's dominant search engine, Alphabet earned $4.9 billion during the April-June period, a 24 percent increase from the same time last year. After subtracting ad commissions, Alphabet's revenue climbed 22 percent from last year to $17.5 billion.

Both the profit and net revenue topped analyst estimates. Alphabet's stock surged 4 percent to $797.85 in extended trading after the numbers came out.

Alphabet would have made even more money if not for its commitment to exploring far-out ideas in its "X'' lab and other risky ventures known as "Other Bets."

That segment suffered an $859 million loss in the second quarter.

--Associated Press.