Microsoft Corp. Chief Executive Satya Nadella sold about half of his shares in the company last week, according to a federal securities filing.

In the filing last week with the U.S. Securities and Exchange Commission, the Redmond, Wash.-based software company reported Mr. Nadella sold 838,584 shares over two days, down from close to 1.7 million shares.

The...

Microsoft Corp. Chief Executive Satya Nadella sold about half of his shares in the company last week, according to a federal securities filing.

In the filing last week with the U.S. Securities and Exchange Commission, the Redmond, Wash.-based software company reported Mr. Nadella sold 838,584 shares over two days, down from close to 1.7 million shares.

The transaction yielded more than $285 million for Mr. Nadella. This is the single-largest stock sale for Mr. Nadella, according to InsiderScore.

“Satya sold approximately 840,000 shares of his holdings of Microsoft stock for personal financial planning and diversification reasons,” a Microsoft spokesman said in a written statement. “He is committed to the continued success of the company and his holdings significantly exceed the holding requirements set by the Microsoft Board of Directors.”

Analysts said the move could be related to Washington state instituting a 7% tax for long-term capital gains beginning at the start of next year for anything exceeding $250,000 a year.

Since taking over as CEO in 2014, Mr. Nadella has overseen a turnaround in Microsoft’s fortunes and transformed the company into one of the most valuable companies in the world as he focused the business on cloud computing and selling to large enterprises. The company is currently trading at a $2.53 trillion market capitalization, up about 780% since he was appointed CEO.

From the Archives

Windows 11, out last month, is full of new features, including a new Start menu that has been moved to the center and a Microsoft Store with Android apps. In an exclusive interview, WSJ’s Joanna Stern spoke with Microsoft CEO Satya Nadella about the software, the influence of the pandemic and his strategy for competing with Google and Apple. Photo illustration: Alex Kuzoian/The Wall Street Journal An earlier version of the closed captions incorrectly transcribed Mr. Nadella’s name. (Video from 6/24/21) The Wall Street Journal Interactive Edition

During the pandemic, the company’s business has accelerated even faster, as more organizations sought out its tools to facilitate remote work. Its stock is trading up more than 50% this year. Mr. Nadella was appointed chairman of Microsoft’s board of directors in June.

Microsoft shares were up 2.3% at $337.31 on Monday afternoon.

Ben Silverman, director of research at InsiderScore, said the sale is similar to Tesla Inc. CEO Elon Musk’s recent stock sales. Mr. Musk took to Twitter

this month pledging to sell 10% of his stockholdings. The Tesla CEO was taking advantage of gains in the company’s stock price, Mr. Silverman said.

The filing of Mr. Nadella’s transaction was made public on the Wednesday before the long Thanksgiving weekend.

“There’s lots of savviness going on with the superwealthy in terms of trying to not spook the stock while taking advantage of market froth and getting ahead of tax-code changes,” said Mr. Silverman.

Write to Aaron Tilley at aaron.tilley@wsj.com