Diverse companies perform better, according to a new study by McKinsey & Co. The report found that impact investing—investing in companies with a diverse board—is more profitable in the long run.

Companies with a gender diverse board of directors are 21 percent more likely to have an above-average profitability, according to U.S. News.

“Companies that are able to attract and retain talent are going to be more successful financially over the long term,” Christopher Greenwald, head of sustainable and impact investing research and stewardship at UBS Asset Management in Zurich, Switzerland told U.S. News. “With policies to support women throughout their careers tend to be better at managing their human capital and attracting the best employees.”

The study also looks beyond gender diversity citing that companies with greater ethnic diversity are 33 percent more likely to see a higher profitability.

Impact investing aims to benefit social environments while demonstrating financial returns. The Annual Impact Investor Survey from 2017 found that impact-investing funds have amassed more than $77 billion in assets.