Microsoft (Nasdaq: MSFT) reported lower profit on higher revenue Thursday, after the world’s largest software maker spent more money to market its Windows operating system and lure consumers flocking to tablets and smartphones.

The results are the first to include Windows 8. The program is a dramatic overhaul of the Microsoft Corp. operating system that powers most PCs. Windows 8 came out Oct. 26 with slightly more than two months left in Microsoft’s fiscal second quarter.

Microsoft is counting on Windows 8 to help the company extend its franchise into tablet computers while still reaping revenue from a new breed of PCs. The redesigned software displays applications in a mosaic of interactive tiles instead of a staid menu. It can be controlled by touching on a display screen, as well as the traditional method of using a keyboard and a mouse.

Although sales of Windows 8 haven’t been as impressive as investors hoped, revenue in Microsoft’s Windows division climbed 24 percent from the previous year. That includes sales that had to be deferred from earlier quarters because the purchases were made before Windows 8’s release.

Net income in the fiscal second quarter declined 3.7 percent to $6.38 billion, or 76 cents a share. Corporate demand helped bolster revenue, which rose 2.7 percent to $21.46 billion, Microsoft said in a statement. Analysts had predicted profit of 74 cents a share on $21.54 billion in revenue, according to the average of estimates compiled by Bloomberg.

Microsoft is investing to compete against Apple Inc. (Nasdaq: AAPL) and Google Inc. (Nasdaq: GOOG) as personal computers running its software lose out to mobile devices. As PC shipments fell during the quarter, analysts cut their estimates for Microsoft’s results, which the company met by boosting sales to businesses upgrading their Windows systems and server software.

“It tells you that they’re still on a transition to moving more towards being a little bit more of a hardware and technology services company,” Kirk Materne, an analyst at Evercore Partners Inc., said in an interview. He rates the stock equalweight.

Sales and marketing spending surged 15 percent to $4.31 billion for the fiscal second quarter as Microsoft introduced Windows 8 and the Surface tablet, while research and development costs rose 6.6 percent to $2.53 billion.

Microsoft fell 1.4 percent to $27.23 in extended trading after closing at $27.63 in New York yesterday. The shares dropped 10 percent in the last three months of 2012, compared with a 1 percent decline in the Standard & Poor’s 500 Index.

New Windows

Microsoft released Windows 8 and the Surface tablet on Oct. 26 to stem the loss of consumers. Even as PC sales declined last year, businesses continued to upgrade their systems, some of them from the 12-year-old Windows XP. That mitigated what Hewlett-Packard Co. Executive Vice President Todd Bradley called a slower-than-expected quarter for Windows 8.

Sales in the Windows division rose 24 percent to $5.88 billion. Excluding recognition of revenue deferred from previous quarters, Windows sales rose 11 percent. Demand from companies signing multiyear contracts translated into unearned revenue, a measure of future sales, of $19.8 billion. That’s better than analysts’ average estimate of $19.1 billion.

That increase was thanks to Surface sales, purchases of upgrades, and retailers and businesses licensing multiple copies, Microsoft Chief Financial Officer Peter Klein said in an interview.

Windows Snags

Worldwide PC unit sales dropped 6.4 percent in the fourth quarter from a year earlier. That was the first time in more than five years shipments have fallen during the holiday shopping season, according to IDC Corp.

“Expectations for Windows were low, this was a number that had come down,” Josh Olson, analyst at Edward Jones & Co., said in an interview. “They met a low number, so I wouldn’t consider this an optimistic sign.”

Klein declined to say how many Surface tablets Microsoft had sold since they debuted.

Analysts’ average estimates for Microsoft’s profit and sales had declined 2.4 percent over the last four weeks, while sales estimates fell 1.3 percent on average, as analysts trimmed their projections on signs that Windows 8 sales hadn’t been as high as they’d predicted.

Corporate Demand

Corporate customers are also rushing to upgrade because Microsoft is ending support for Windows XP, which debuted in 2001. Microsoft also started rolling out a new version of Office, which includes the Word and Excel productivity programs.

“One of the biggest stories in 2013 is the business transition from Windows XP to Windows 7,” said Bob O’Donnell, an analyst at market research firm IDC. “There are a staggering number of machines still running Windows XP. The IT guys have to pull the plug on those and upgrade, and most will do that by buying new machines.”

Machines running Windows 7, which was introduced in 2009, remain available as Windows 8 is rolled out. Some companies are still opting for the earlier version because it’s field-tested and available on more machines.

“Right now investors are myopically focused on the Windows business,” said Brent Thill, an analyst at UBS AG in San Francisco. “It’s an important business, but they forget about the other 75 percent of revenue.”

(Bloomberg and The AP contributed to this report.)