What happened 

Shares of tech giant Microsoft (MSFT -1.27%) are up 21.8% in the first half of 2021, according to S&P Global Market Intelligence. The company continued to benefit from global populations staying home more often and remote working arrangements.  

The rally has continued into July, and the stock is now up 27.1% year to date.

A person sitting in front of a computer.

Microsoft stock was up 21.8% in the first half of 2021. Image source: Getty Images.

So what 

Microsoft's revenue and profit surged in its most recent quarter as consumers looked for tech solutions during the pandemic. Overall revenue increased by 19%, and net income increased by 44%. Even as economies are reopening worldwide, one of the last things to return is professionals going back to offices. That's increasing demand for several Microsoft products and services because folks need to build out the technology to work from home.

Moreover, the company's highly profitable commercial cloud business is growing faster than the business overall. The company's cloud offerings are a viable alternative to Amazon's cloud services. Indeed, commercial cloud bookings increased by 39%. The segment operates at a gross profit margin of 70%.

The fast-growing segment is fueling growth for the giant company that has now increased revenue by double digits in three straight years. Investors are pleased that Microsoft, with over $100 billion in annual sales, continues finding ways to expand.

Now what 

It appears as though when companies do call employees back to offices, it's going to be for part of the week. Staff will have the option to work from home for a couple of days and in the office the rest. The blended working arrangement will call for two workstations per worker, one at home and one in the office. 

Microsoft is in a good position to continue benefiting from long-run secular trends that are not likely to go away even in the aftermath of the pandemic. The development of cutting-edge technology, supplemented by stable cash flow businesses like Microsoft 365, could allow it to continue growing revenue for several years. 

Further, Microsoft has proven it can grow profitably. Over the last decade, it averaged an operating income margin of 33.1%. Despite its rapid rise so far in 2021, the stock looks like it could have more room to go higher