(Adds Musk's donor rank; paragraph 11)
By Hyunjoo Jin
SAN FRANCISCO, Feb 14 (Reuters) - Tesla chief executive Elon Musk donated a total of 5,044,000 shares in the world's most valuable automaker to a charity from Nov. 19 to Nov. 29 last year, its filing with the U.S. Securities and Exchange Commission (SEC) showed on Monday.
The donation was worth $5.74 billion, based on the closing prices of Tesla shares on the five days that he donated the stock. The filing did not disclose the name of the charity.
The donation came as the billionaire sold $16.4 billion worth of shares after polling Twitter users about offloading 10% of his stake in the electric-car maker in early November.
He said on Twitter that he would pay more than $11 billion in taxes in 2021 due to his exercise of stock options set to expire this year.
He also traded barbs with politicians Bernie Sanders and Elizabeth Warren who called on wealthy people to pay more taxes.
Analysts have said there would be a tax benefit for Musk potentially gifting Tesla stock, since shares donated to charity are not subject to capital gains tax, as they would be if sold.
"His tax benefit would be huge," said Bob Lord, an associate fellow at the Institute for Policy Studies who studies tax policy.
"He'd save between 40% and 50% of the $5.7 billion in tax, depending on whether he could take the deduction against his California income and he'd avoid the gains tax he would have to pay if he sold the stock."
Lord added that Musk might have contributed the stock to intermediaries such as "donor-advised funds," not outright to charitable groups.
Tesla was not immediately available for comment.
The donation ranks Musk as America's second-biggest donor after Bill Gates and Melinda French Gates last year, data from the Chronicle of Philanthropy shows.
Musk's public philanthropy gestures have so far trailed other billionaires. Musk and Amazon.com Inc founder Jeff Bezos have donated less than 1% of their net worth, whereas Warren Buffett and George Soros had given away more than 20% by early September, according to business magazine Forbes.
Musk is president of the Musk Foundation, offering grants for the "development of safe artificial intelligence to benefit humanity" among other causes, according to its website.
Last year, Musk and the foundation offered $100 million prizes to those who can come up with a technology to help remove carbon from the atmosphere.
Last year, he said he was donating $20 million to schools in Cameron County, Texas, the location of a Space X rocket launch site, and $10 million to the City of Brownsville.
Musk has also flirted with more ambitious philanthropy goals.
On Twitter last year he said, "If (the United Nations World Food Programme) can describe ... exactly how $6 billion will solve world hunger, I will sell Tesla stock right now and do it."
He was responding to a plea for a donation from David Beasley, the executive director of the World Food Programme.
In January last year, he asked Twitter users about "ways to donate money that really make a difference (way harder than it seems.)" (Reporting by Hyunjoo Jin in San Francisco, Additional reporting by Bhargav Acharya; Editing by Raju Gopalakrishnan and Clarence Fernandez)