Fortunately, there’s also a mathematical method available for going about this without making your coworkers uncomfortable about divulging their salaries (which a lot of people just won’t do). Here’s how:
First, you get a group together around a lunch table or something…
Then, you each take your own salary and add an arbitrary number to it — the larger the better. So, each person will likely have numbers like $1,758,247, which obviously no one makes.
Then you add up all of the fake numbers, and then pass a calculator around the table and ask each person to subtract the arbitrary number that they used to bump up their real salary. (They can do this privately without others seeing.)
Assuming each person does this correctly, the number you wind up with will be the actual total of all of your salaries at that table. You then divide that by the number of people participating, and you then have an average that everyone can look at and privately compare with their own salary.
Thus, you get good, (hopefully) reliable information, and no one had to divulge their actual number.