Sexual harassment, bullying and racist stereotyping are common in the technology industry, creating a culture that drives underrepresented employees out of their jobs, new research has found.

One in 10 women in tech experience unwanted sexual attention, and nearly one in four people of color face stereotyping, according to the Kapor Center for Social Impact and Harris Poll, which surveyed more than 2,000 people who left tech jobs in the last three years.

The findings – which suggest that sexual harassment and complaints about unfairness are disproportionately high in the tech sector compared to other industries – come at a time of heightened debates around diversity and discrimination in Silicon Valley.

“For each person who experiences unfairness, it’s very personal and it’s very painful,” said Ellen Pao, Kapor’s chief diversity and inclusion officer and former Reddit CEO, who has been outspoken about discrimination. “As someone who has been working in the tech industry since 1998, I know it’s prevalent, and now we have the data so people can understand the scale.”

A former Uber engineer’s recent account of facing rampant sexism and sexual misconduct has shined a harsh light on a startup culture that is dominated by white men and condones mistreatment of marginalized employees. Critics have increasingly argued that tech firms dedicated to “disruption” are rejecting labor standards while male executives ignore complaints about discrimination and do little to fix systemic pay disparities.

The Tech Leavers Study released on Thursday is the first report of its kind to analyze the reasons why tech workers voluntarily leave their jobs and paints a picture of turnover driven by hostile work environments.

Tech workers most frequently cited “unfairness or mistreatment” as the reason for leaving, a factor that was mentioned twice as much as recruitment for better opportunities. Underrepresented men of color were the group most likely to leave due to unfairness, with 40% citing that reason. A total of 78% of employees said they experienced some form of “unfair behavior or treatment”.

Ellen Pao, who sued her former employer for gender discrimination, has been outspoken on the subject: ‘Now we have the data so people can understand the scale.’ Photograph: Bloomberg via Getty Images

Women of color in particular reported high rates of facing discrimination. Thirty percent of underrepresented women said they were passed over for a promotion, a rate significantly higher than white and Asian women. Additionally, unwanted sexual attention was reported at rates almost twice as high among employees in the tech sector compared to tech employees in other industries, the survey found. Of those who said they faced sexual harassment, 57% said those experiences contributed to their departures.

LGBT tech workers were the most likely to experience bullying and hostility, with 25% citing “rude and condescending behavior” and 24% saying they were publicly humiliated or embarrassed. A majority of queer employees (64%) said bullying contributed to their decision to leave.

The authors of the report argued that the cost of this kind of unnecessary turnover due to workplace issues was immense. Based on estimates of average costs for replacing employees in tech jobs, the annual cost to tech companies for turnover due to unfairness could be $16bn, the report said. A large tech firm that pays 10,000 engineers an average of $100,000 could lose $27m due to their workplace culture pushing employees out, the survey said.

The report suggested that strong diversity and inclusion initiatives, such as explicit diversity goals, unconscious bias trainings, employee resource groups and bonuses for referrals of diverse candidates, can significantly improve retention.

Previous studies have suggested that women make up only 25% of the tech workforce, and that at the largest companies, such as Apple, Google and Facebook, black and Latino employees combined represent only 3-5% of employees.