The richest man alive can afford anything in the grocery store, along with the grocery store itself. Back when he was a college kid in Canada, he wanted to see how little of it he could get by on.

Tesla and SpaceX CEO Elon Musk, who became a trillionaire after SpaceX went public in June, spent part of his early college years living on about $1 a day for food. The experiment wasn’t about being broke. It was about finding out how much failure he could survive.

Read more: Elon Musk explains how he’d rebuild his fortune with only $1,000 — but his plan requires money from other people

The menu got old fast

“In America, it’s pretty easy to keep yourself alive,” Musk said on the “StarTalk” podcast in 2015. “So my threshold for existing is pretty low. I figured I could be in some dingy apartment with my computer and be okay and not starve.”

To test that theory, he capped his food spending at roughly $30 a month. “I’d try to live on $1 a day, which I was able to do,” Musk said. “You sort of just buy food in bulk at the supermarket.”

Host Neil deGrasse Tyson guessed rice and beans. Musk had a different shopping cart in mind.

“Yeah, I went more for the hot dogs,” he said. “Hot dogs and oranges. But you do get really tired of hot dogs and oranges after a while.”

Then he added a backup plan. “And you can also like, you know, pasta and green pepper and a big thing of sauce and that can go pretty far too,” Musk said.

Elon Musk is the richest man in the world, but said his threshold for existing was pretty low.

Win McNamee / Getty Images

A $30 safety net for the mind

The diet was never the point. Musk wanted to know his floor before he started gambling on bigger ideas.

“If I can live for a dollar a day, then at least from a food cost standpoint…well, it’s pretty easy to earn like $30 in a month anyway, so I’ll probably be okay,” he said.

Read more:

  • Elon Musk tells Tesla investors there is ‘only one way’ to eliminate poverty
  • Elon Musk says treasury should just ‘issue people checks’ rather than taxing the rich
  • Elon Musk once backed Buffett’s 5-minute fix for national debt: ‘This is the way’

Tyson framed the experiment as a launchpad, and Musk agreed. Once he knew a part-time paycheck could cover his groceries, skipping a steady job to chase a startup looked a lot less scary.

He followed through. Musk transferred to the University of Pennsylvania and became a millionaire at 28 after selling his first company, Zip2.

Read more:

  • Elon Musk tells Tesla investors there is ‘only one way’ to eliminate poverty
  • Elon Musk says treasury should just ‘issue people checks’ rather than taxing the rich
  • Elon Musk once backed Buffett’s 5-minute fix for national debt: ‘This is the way’

That dollar doesn’t stretch anymore

Musk isn’t recommending anyone copy him. “I would not encourage anyone to live on $1 a day,” he wrote in a 2016 email to a Business Insider reporter who had tried a version of the challenge. “That would not be super fun. Also, I did this back in 1990, so a dollar went a lot further back then. Would be much harder to do that today.”

He’s right about the math. One dollar in 1990 has the buying power of about $2.65 today, according to the Bureau of Labor Statistics CPI Inflation Calculator. That turns Musk’s $30 monthly grocery budget into roughly $77.

Even that sum falls well short of what the government prices as a no-frills healthy diet. The USDA Thrifty Food Plan, its cheapest benchmark for nutritious home cooking, put the October cost at $319.10 a month for a man ages 20 to 50 in a four-person household. A woman in the same age range came in at $254.20.

Grocery bills are still climbing, too. Food-at-home prices rose 0.4% in October from September, the biggest monthly jump since April, according to the latest Consumer Price Index report.

Musk’s floor is a number anyone can find

The useful part of Musk’s experiment has nothing to do with hot dogs. He calculated the bare minimum it cost him to stay afloat, and that number made risk feel manageable.

Anyone can run a version of that math without giving up fresh vegetables. Add up rent, utilities, insurance and a thrifty grocery budget, and the total becomes a personal survival number. Knowing it can make a job change or a new side business feel far less frightening.

That number also shows how small habits stack up. “Shark Tank” investor Kevin O’Leary has griped about $28 lunches for the same reason, since everyday spending adds up fast against a tight monthly floor.

Hot dogs and oranges won’t make anyone a trillionaire. Knowing exactly what it takes to keep yourself alive in America might make the next big risk feel a lot more affordable.

Related: Kevin O’Leary admits he was ‘wrong’ on Trump — and flags a big shift for AI stock investors