In recent years the notion that failure brings rewards has become so venerated by business thinkers (and publications) that you could be forgiven for thinking yourself lacking if you haven’t suffered at least one calamitous, abject disaster in your career. In truth, people who have tried and failed at launching their own startup know that it incurs many unrecouped costs: time, sweat, emotion, and, most often, money.

But new research reveals an unexpected reward for those who abandon the entrepreneurial life. According to a paper by finance professor Gustavo Manso of the University of California at Berkeley, self-­employment does, in fact, pay off—often in the form of higher wages when the person returns to work at another company. “You don’t need to be crazy to be entrepreneurial,” says ­Manso, who holds the school’s William A. and Betty H. Hasler Chair in New Enterprise Development. “There’s a reasonable payoff.”

Manso analyzed the earnings of more than 5,000 Americans between 1979 and 2012, using data from the U.S. Bureau of Labor Statistics. They showed that the typical person makes less as an entrepreneur than he could earn at a bigger company. Most of those people go back to salaried jobs after two years or less—and that’s where it gets interesting.

People who had been self-employed at one point in their career did better financially compared with people who hadn’t, according to Manso’s research. Those who tried and abandoned entrepreneurship after less than two years weren’t punished financially when they moved to another employer. And those who lasted more than two years as entrepreneurs ended up earning 10% to 20% more than their peers.

VEN.04.01.16.sidebar

“Big companies are willing to pay more because they believe they’ll get more bang for their buck,” says John Reed, senior executive director at IT staffing firm Robert Half Technology. In just the past few years he has seen increased demand for entrepreneurial recruits, especially among large companies.

Former business owners often bring a broad set of skills gained from handling multiple problems, ­moving fast, and getting things done with limited resources. Says Reed: “Big companies need that different way of thinking.”

That was the case for David Bloom, whose e-commerce software startup, Ordrx.com, shut down last year despite $2.5 million in investment from Google and Techstars, industry accolades, and 40 employees. Failure couldn’t have worked out better for him. It turns out all the sleepless nights about meeting payroll and the long hours building software and doing customer research set him up for a big promotion. Before he started Ordrx, he had been a product director at American Express axp . When he returned to the workforce late last year, he nabbed a vice president job at Dow Jones, earning nearly double his previous salary. “What I got out of leaving was much more diverse professional skills than if I had stayed at American Express,” Bloom says. “A startup was a business education at warp speed every day.”

Bloom says the entrepreneurial stint also gave him the confidence to apply for higher-level jobs at large companies and in a wider array of industries. Headhunters regularly call him for new job opportunities. “Big companies want that mix of startup and big-­company experience,” he says.

Failure, he says, is irrelevant to most hiring managers if you’re honest about why you failed and what you learned from it. “Just own it,” Bloom says, “because you went out and did it.”

Running your own business can also help chart a completely new career path, as was the case for former entrepreneur Rachel Honeth Kim. She spent a year running Nailed Kit, a startup that sold designer fingernail decals, before deciding she wasn’t passionate enough to continue long term. She discovered she hated the back-office tasks of budgets and taxes, but she excelled at getting press for her startup in a number of national beauty magazines.

When she went back to the workforce, she applied for high-level public relations jobs, despite no formal training or past PR positions. (Most of her 10-year career was spent in marketing.) Yet Kim landed a senior-level job heading all the communications for Gusto, a 300-person online payroll company. Plus, she says, she received a 20% pay raise from her last salaried job. “It’s my dream job,” she says, “but I never would have gotten it if I hadn’t been an entrepreneur.”

A version of this article appears in the April 1, 2016 issue of Fortune.