SAN FRANCISCO — Microsoft's fiscal fourth-quarter results show how hard it will be for CEO Satya Nadella to improve the company's bottom line in his first full year on the job.

Saddled with higher costs and the restructuring charges that came with the acquisition of mobile phone-maker Nokia, the company's net income fell 7% for the quarter ended in June, more than Wall Street was expecting.

The company's quarterly operating expenses were almost $9.2 billion, well above the range of $8.4 billion to $8.6 billion the company forecast in April.

And Microsoft expects to incur from $1.1 billion to $1.6 billion in costs during its upcoming current fiscal year related to Nadella's plan to fire 18,000 workers — about two-thirds of them Nokia employees.

Still, Nadella has time to work on making former CEO Steve Ballmer's risky Nokia bet pay off, as Microsoft sales rose 18% in the quarter compared with a year earlier.

Revenue rose 11.5% for the year, helped by strength in the company's largest businesses and a surge in cloud revenue.

The company's commercial business had revenue of nearly $13.5 billion, slightly higher than forecast, as the company held on to customers even as more businesses move their data and apps into the cloud.

Microsoft said the company's commercial cloud revenue more than doubled and is running at an annual rate of $4.4 billion.

That helped drive the company's cash from operations up 61% for the quarter and 12% for the just-completed fiscal year.

With the company generating a massive $32 billion in annual operating cash, Nadella can afford to return more of it to shareholders.

Microsoft paid a higher dividend and bought back more of its own shares than a year earlier.

That helps explain why the company's shares are up 20% this year, almost triple the return of the Nasdaq Composite Index.

Taking care of investors should help buy Nadella time as he looks to boost sales and profit growth even while integrating Nokia's struggling hardware business.

John Shinal has covered tech and financial markets for more than 15 years at Bloomberg, BusinessWeek,The San Francisco Chronicle, Dow Jones MarketWatch, Wall Street Journal Digital Network and others. Follow him on Twitter: @johnshinal.