Microsoft (Nasdaq: MSFT), the world’s largest software maker, announced a new $40 billion stock buyback and increased its dividend 22 percent, seeking to reward shareholders at a tumultuous time for the company.

The new repurchase program, which has no expiration date, replaces another $40 billion buyback plan that was due to lapse at the end of this month, Redmond, Washington-based Microsoft said today in a statement. The company’s quarterly dividend will rise 22 percent to 28 cents a share, payable to shareholders on Dec. 12.

“These actions reflect a continued commitment to returning cash to our shareholders,” Chief Financial Officer Amy Hood said in the statement.

After struggling to keep up with rivals in the smartphone and tablet markets, Microsoft is retooling its strategy and seeking a new chief executive officer. Steve Ballmer, who has run the company since 2000, announced plans last month to retire when a replacement is found. The company also agreed to buy Nokia Oyj’s phone business for $7.2 billion, aiming to bolster its position in mobile devices.

Microsoft shares rose 3.5 percent to $33.94 in early trading. The stock had added 23 percent this year through yesterday.