For any investor looking to reach the top of the global rich list, blowing their fortune on a single lunch may seem an unlikely way of securing a leg up on their rivals.

But that’s just what one anonymous bidder has done, paying almost $3.5m to break bread with Warren Buffett and the opportunity to glean some advice from one of the world’s most successful businessmen.

However, the $3,456,789 (£2.42m) is not going to line the pockets of the Berkshire Hathaway chief, who is the world’s third-richest person with a $66bn fortune, according to Forbes. Rather, it will help a San Francisco homeless charity called Glide.

Forbes' 10 richest people in 2016 – in pictures Read more

Rev Cecil Williams, one of Glide’s co-founders, said: “We are astonished by the results of this year’s auction and send heartfelt gratitude to Mr Buffett for his deep investment in unconditional love and community.”

It is the 15th year that the charity has auctioned a lunch with the Sage of Omaha, who has helped it to raise more than $20m.

This year’s winning bid equals the record set in 2012 and was more than $1m higher than the $2,345,678 paid last year by the boss of China’s Dalian Zeus Entertainment. Zhu Ye, chief executive of the gaming company, called the chance to dine with Buffett a dream come true.

The week-long auction was conducted on eBay and this year’s prize also became the joint most expensive individual charity item sold on the site.

Six of the past eight winners have paid more than $2m for lunch with Buffett.

His late wife Susie was involved with Glide and Buffett has maintained the relationship following her death in 2004.

Glide serves more than 850,000 meals a year, provides housing and health services as well as helping people to break out of poverty. Buffett said he was proud to be involved with an organisation that had helped so many people in need: “Glide is a bridge for thousands of people on the brink of despair, helping them achieve dignity and opportunity by providing them with basic services.”

Homelessness has become a major issue in the northern Californian city in recent years. In February, technology entrepreneur and startup founder Justin Keller sparked controversy after writing an open letter to the mayor and police chief of San Francisco. He complained that “wealthy working people have earned their right to live in the city” without passing by homeless people on a regular basis. “I shouldn’t have to see the pain, struggle, and despair of homeless people to and from my way to work,” Keller wrote.

Buffett has said he is asked a wide range of questions at the lunches, which usually run for several hours. The only topic not on the menu is his future investment targets. It is usually held at the Smith & Wollensky steakhouse in New York City, or another venue if the winner wants to remain anonymous. The winning bidder is also allowed to bring seven friends to the lunch.

Buffett is known for his fondness for investing in mature businesses with steady cashflows, such as insurers, railway operators and consumer goods firms including Coca-Cola. He raised eyebrows last month after Berkshire revealed it had made a $1bn investment in Apple. The only other technology company that Buffett had invested in previously was IBM.

Last year Buffett donated shares in Berkshire Hathaway worth about $2.8bn to the Bill and Melinda Gates Foundation and four other charities as part of his plan to give away almost all of his wealth.