Some people dream of leaving the 9-to-5 to strike out on their own. But while the benefits of being one’s own boss look attractive, not all entrepreneurs will be successful. So how can someone with entrepreneurial ambitions increase their chances of reaching their goals?

To get an idea of how an aspiring entrepreneur will do, you have to look at where they’ve been, says Professor Damon Phillips. The career experiences of entrepreneurs — before they become business owners — directly affect their success. “If an MBA student wants to be an entrepreneur, they often ask, ‘what type of firm should I work for, and why?’” Phillips says.

While many factors determine whether someone will become a successful entrepreneur, previous research has indicated that the size of an individual’s previous employer is particularly influential — and the smaller, the better. “Skill and vision are the two most important considerations for potential entrepreneurs,” Phillips explains. “In a small company, you have to integrate across different functions and skills. Money can be tight, so there’s often an innovative, entrepreneurial mindset among employees. You don’t get that general skill set and broad vision in a larger company, where most employees have very specific jobs to do.”

But to date, scholars have been focused on pinpointing which individuals will become entrepreneurs, not on predicting how successful someone will be after they make the jump to self-employment. “It won’t do any good to become an entrepreneur if you’re going to crash and burn,” Phillips says. “So the next logical question is, ‘how successful will you be?’”

Phillips, working with Jesper Sørensen of Stanford University, examined this question with labor market data from Denmark’s tax system. The detailed data tells researchers where the country’s entrepreneurs previously worked, for how long, and at what salaries.

The researchers defined entrepreneurial success in two ways: financial performance, measured by each entrepreneur’s income from their company, and commitment, or how likely an entrepreneur was to stick with their venture. Even when the researchers controlled for many factors such as whether parents were also entrepreneurs (Denmark tracks this data point), they found that smaller companies not only bred more entrepreneurs, but also bred more successful business owners — with some caveats. For financial performance, the larger the previous employer, the lower the entrepreneurial income. However, if the entrepreneur was a sole proprietor and had only himself on the payroll, the previous employer size had no effect.

The researchers also found that independent of financial success, entrepreneurs are less likely to stick with their venture if their previous employer was larger — for instance, a firm with more than 100 employees as opposed to five. But again, the effect was weaker if the entrepreneur worked solo, with no employees, compared to those with employees.

Read More: