A confidential questionnaire was sent to MSPs, MSPs’ staff, Scottish Parliament staff and others working in the parliament, such as journalists, at the end of 2017.
The results of the survey made for “difficult reading”, the Scottish Parliament’s presiding officer, Ken Macintosh, said.
While the majority – 78 per cent – of respondents said they had not experienced sexism or sexual harassment, 20 per cent said they had, and two per cent weren’t sure.
When broken down by gender, 30 per cent of women and six per cent of men reported experiencing inappropriate behaviour in some form.
Perpetrators were reported to be predominantly male and in a position of authority over those experiencing the behaviour.
Commenting on the results of the survey, Ken Macintosh said: “For an institution which prides itself on openness, inclusivity and on having progressive working practices, a number of the findings make for difficult reading.
“I am sorry that people have experienced this type of behaviour while working here.
First Minister Nicola Sturgeon said she was "shocked, saddened and disappointed" by the survey results and she welcomed the apology from the presiding officer to those who had experienced harassment or sexism while working in the parliament.
She said: "It is clear that women and men - but mainly women - have put up with behaviour that is unacceptable.
Over 1,000 responses to the survey were received, which was conducted by independent market research company Progressive on behalf of the Scottish Parliament.
The research found that awareness of reporting procedures was high, but the low percentage of people reporting incidents could suggest a lack of confidence in the processes.