NEW YORK — Warren Buffett, the second-richest person in the U.S., made his largest single charitable contribution with a gift of $2.1 billion to the Bill and Melinda Gates Foundation as he seeks to encourage giving by the wealthy.

The chairman and chief executive officer of Omaha, Nebraska-based Berkshire Hathaway gave 16.6 million Class B shares Monday in an annual gift to the foundation, where he is a trustee, according to a regulatory filing Tuesday. The donation beat last year’s record gift of $2 billion, when he gave 17.5 million shares. The stock has gained 8.4 percent this year to $128.49 as of Tuesday’s market close.

Buffett, 83, has urged the ultra-wealthy to give away more money. He and Gates helped found the Giving Pledge, which asks billionaires including Mark Zuckerberg, the CEO of social media giant Facebook, to donate the majority of their wealth to charity. More than 120 have agreed.

“Now we’re starting to get a few members from outside the United States, as well,” Buffett said June 9 at the Edison Electric Institute annual convention in Las Vegas. “It can’t be a bad thing and I think it will turn out to be quite a good thing.”

The investor’s wealth soared this year to more than $65 billion before donations that were announced Tuesday to the Gates Foundation and other charities. Bill Gates, the co-founder of Microsoft, is the world’s richest man according to the Bloomberg Billionaires Index, a daily ranking of the wealthiest people.

Buffett said he asks those who take the Giving Pledge to write letters about why they are donating, to inspire other rich people. He said it’s important for younger billionaires such as Zuckerberg, 30, to set an example.

Zuckerberg “has an audience that’s just totally different than what I would have,” Buffett said at the conference. “These letters will have an effect in changing the norm somewhat in this country.”

The Facebook CEO is among billionaires who don’t have a letter posted along with their names on the Giving Pledge website. Others use the opportunity to talk about the importance of philanthropy or personal interests.

Most of Buffett’s donations go to the Gates Foundation, which focuses on hunger, poverty and education. He earmarked 10 million Class B shares for the Seattle-based charity in 2006 and gives 5 percent of the remaining total each year. The shares were split 50-1 in 2010.

The value of the annual gift fluctuates with Berkshire’s share price. Last year, he gave 17.5 million shares to the Gates Foundation, worth $2 billion.