The surge comes following announced investments in AI after company laid off thousands earlier this month.

Based on its post-market trading, Microsoft has become the world's second $4 trillion company following quarterly earnings.

Company’s second-quarter financial results showed a booming cloud business and enormous capital expenditures