Image credit: Stan Honda/AFP/Getty Images

Bill Gates has regained his title as richest man in the world after five years out of the top spot, beating Mexican billionaire Carlos Slim.

The net worth of Gates, founder of Microsoft and co-chair of the Bill and Melinda Gates Foundation, hit a five-year high on Thursday at $72.7 billion, topping that of Slim, 73, according to Bloomberg Billionaires Index.

Gates last held the title, which has also been held by Berkshire Hathaway chairman and CEO Warren Buffett, five years ago.

Though Gates, 57, is still chairman of Microsoft, he only owns about 5 percent of it, reports Forbes. Microsoft shares are up 28 percent this year. Bloomberg figures that Gate's fortune has risen 15 percent this year.

Slim's net worth has dropped about $3 billion due to regulatory issues with his company, America Movil SAB, the largest mobile-phone operator in the Americas, according to Bloomberg. The Mexican government passed a law earlier this month reforming the telecommunication industry by boosting competition.

Slim's company controls 80 percent of Mexico's landline phone market and 70 percent of the wireless market, according to Forbes.

Gates also holds the title of "world's most generous person," not only promising to give half his wealth to charitable causes, but recruiting other wealthy people along with Buffett to join their group, The Giving Pledge.

Read more: Spanx Founder First Female Billionaire to Join Gates' Giving Pledge