Determination turned Apoorva Mehta into a billionaire. More than 900 million grocery deliveries helped, too.
Mehta is the 37-year-old co-founder of Instacart, the online grocery delivery startup that went public on Tuesday and now boasts a market value of $8.8 billion. As Instacart's largest individual shareholder, Mehta is now worth a reported $1.1 billion after selling 700,000 shares of the company he launched in San Francisco in 2012.
His path to becoming a billionaire was anything but certain, he told CNBC's "Squawk Box" on Wednesday: It was littered with the remains of "about 20" failed startups that he attempted, before finally finding success with Instacart.
Get top local stories in Southern California delivered to you every morning. Sign up for NBC LA's News Headlines newsletter.
In 2010, Mehta was living in Seattle and working in logistics for Amazon as a supply-chain engineer. He quit his job and moved to San Francisco with a desire to build his own successful startup but no clear plan, he said.
"The reason why I quit my job at Amazon was because I wanted to become an entrepreneur," Mehta said. "I didn't know what my idea was going to be."
Over the next two years, his entrepreneurial attempts ranged from an advertising startup for gaming companies to a social network for lawyers. "Unfortunately, all of them failed," said Mehta.
Money Report
Finally, he finally turned to his own refrigerator for inspiration. Being low on groceries "was an ongoing problem for me," Mehta said, and he figured he probably wasn't alone.
He also saw a gap in a thriving online delivery market. "This was 2012 and we were ordering everything online, except for groceries," said Mehta. "I decided I was going to change that. I started coding the first version of the Instacart app and, three weeks later, Instacart was born."
Instacart got off to a bumpy start: Mehta wanted to get into the coveted startup accelerator Y Combinator, but missed a deadline to apply, he told TechCrunch in 2012. He managed to impress Y Combinator's partners by using his app to deliver a six-pack of beer to the accelerator's headquarters, securing himself a spot.
Y Combinator helped Mehta land $2.3 million in venture capital funding within a few months, and Instacart quickly spread beyond San Francisco. It now delivers groceries from more than 80,000 stores, including chains like Kroger, Costco and Wegmans, in more than 14,000 cities across North America.
Before going public, Instacart wrote in an SEC filing that the company had delivered more than 900 million orders, containing 20 billion items, since Mehta first launched the app in 2012. With the IPO, Mehta will depart his role as the company's executive chairman after stepping down as CEO last year, ending an 11-year run with the company.
DON'T MISS: Want to be smarter and more successful with your money, work & life? Sign up for our new newsletter!
Want to earn more and land your dream job? Join the free CNBC Make It: Your Money virtual event on Oct. 17 at 1 p.m. ET to learn how to level up your interview and negotiating skills, build your ideal career, boost your income and grow your wealth. Register for free today.