Bill Gates is a genius. But he doesn't know much about grocery prices.

The billionaire appeared on the "The Ellen DeGeneres Show" Wednesday, and played a guessing game in which he attempted to name the prices of various household products and food items.

He didn't do well at all, but seemed to be in on the joke.

"We're going to test your knowledge of some everyday items that you get at the supermarket," DeGeneres said to Gates. "When was the last time that you have been at a supermarket?"

"A long time ago," said Gates.

Gates had to guess the prices of five everyday items, with a little help from the studio audience, which seemed amused and surprised when he got some prices wrong, by a pretty wide margin.

Rice-A-Roni?

"I'll take five!" quipped Gates, but the correct answer was $1.

He was way off on a package of Tide Pods, guessing $4, and the crowed audibly guffawed.

"They want me to go higher," he said, changing his guess to $10.

The correct answer was actually $19.97.

"It's expensive to do laundry," DeGeneres informed him.

He was more confident when confronted with dental floss. "This is my best chance," he said, noting that he's an avid flosser, and his guess was correct. He said $4, and the price was actually $3.78. DeGeneres said any guess within $1 is considered correct.

Related: Bill Gates urges more spending on foreign aid

But he blew it on Totino's pizza rolls and TGI Fridays spinach and artichoke dip. He said $22 for the pizza rolls when it was really $8.98, and $10 for the dip when it was really $3.66. He said that he guessed $10 because the dip was "branded."

This was Gates' first appearance on the Ellen show, where he told DeGeneres that he doesn't have that many "extravagant tastes," though he does have some "indulgences," including a Porsche, a private plane and a trampoline room in his house.

Gates is the founder of Microsoft (MSFT) and a philanthropist with his wife through the Bill & Melinda Gates Foundation. He has a net worth of $91.8 billion, according to Bloomberg, surpassed only by Jeff Bezos, CEO and founder of Amazon (AMZN).

DeGeneres praised Gates for his charitable work. He and his wife Melinda have committed to give more than half of their $84 billion fortune away during their lifetimes.

"I'm glad you're a billionaire," she said.