(Reuters) - Microsoft Corp MSFT.O beat Wall Street's profit forecast on Wednesday, helped by growth in its cloud computing business, but took a $13.8 billion one-time charge due to the new U.S. tax law.

FILE PHOTO: A Microsoft logo is seen a day after Microsoft Corp's $26.2 billion purchase of LinkedIn Corp, in Los Angeles, California, U.S., on June 14, 2016. REUTERS/Lucy Nicholson/File Photo

Stock of the world’s largest software company, which have risen almost 50 percent over the past 12 months, initially fell in after-hours trading but later moved into positive territory.

The quarter was the 10th in a row of more than 90 percent revenue growth for its flagship Azure cloud computing service, which directly competes with Amazon.com Inc's AMZN.O Amazon Web Services.

Amazon customers hoping to avoid being locked into one service could be helping growth, said Kim Forrest, an equity analyst at Fort Pitt Capital Group. “If you’re really smart you’ll have not one provider but two,” she said.

Since Chief Executive Satya Nadella took the helm in 2014, Microsoft’s cloud business - which includes products such as Office 365, Dynamic 365 and Azure - has emerged as a major growth area.

Revenue from what Microsoft calls its intelligent cloud segment rose 15.3 percent to $7.8 billion in the company’s fiscal second quarter, including 98 percent growth for Azure. Analysts on average had expected $7.51 billion, according to Thomson Reuters I/B/E/S.

Amazon Web Services is the leader of the $14.4 billion cloud computing market with more than 31.8 percent market share, but Azure has been growing fast and holds the No. 2 position with 13.9 percent of the market, according to 2017 third quarter estimates by research firm Canalys.

Microsoft's tax charge lead to a net loss of $6.30 billion, or 82 cents per share, in the quarter ended Dec. 31, compared to a profit of $6.27 billion, or 80 cents per share, a year earlier. [bit.ly/2npGtLa]

Excluding one-time items it earned 96 cents per share, beating analysts’ average expectation of 86 cents.

“If they are the only company taking a one-time tax write off that would be disconcerting but the fact that nearly everyone is doing it implies it is not a big deal,” said Adam Sarhan, chief executive of 50 Park investments, an investment advisory service.

Many U.S. companies have taken large one-time charges this quarter to account for changes to the U.S. tax law made in December, which cut the overall corporate rate and offered a lowered rate for companies repatriating overseas profits to the United States.

Besides Azure, Microsoft’s other businesses also grew. Revenue from its productivity and business unit, which includes the Office 365 service, was up 24.7 percent to $8.95 billion. Revenue at Microsoft’s “more personal computing” unit, which includes Windows, Xbox and Surface, rose 2.36 percent to $12.17 billion.

Overall revenue climbed 12 percent to $28.92 billion, beating analysts’ expectations of $28.40 billion.

(This story has been refiled to correct day in first paragraph to Wednesday from Tuesday)