See a Magnum Photos gallery from Jim Goldberg’s Rich and Poor.

My first job after finishing graduate school was as a World Bank consultant. The pay I negotiated with my boss—$45,000, tax-free—was more than I’d earned in my entire life up to that point and certainly more than I knew what to do with. I moved into a basement apartment in Georgetown; bought some grown-up furniture and started eating sushi at will. I was content, until the moment I discovered via water-cooler chatter how much more other Ph.D.-educated employees—people just like me—earned at the bank. My monthly paychecks began eating away at my soul.

The anxiety and discontent caused by previously private salaries being revealed is an office story line common enough that it’s been dramatized in episodes of The Office and Mad Men. It’s now also been carefully analyzed in a newly released study in which a group of Berkeley and Princeton researchers notified University of California employees of a Sacramento Bee Web site where they could compare their earnings to those of their peers. Their subjects’ reactions will hardly surprise anyone who has found himself in a similar position. In a follow-up survey run by the researchers, below-median earners exposed to the salary Web site reported significantly lower job satisfaction and were more likely to be hunting for a new job than low earners who weren’t exposed to salary info. For relatively high earners, information about others’ salaries didn’t seem to make any difference in their happiness or the likelihood they were searching for a different job.

Why do we care what those around us make? It doesn’t affect the real estate or furniture or sushi dinners we can afford. The decidedly asocial view that economists once had of human well-being would hold that the pay of others is irrelevant. According to this perspective, finding out that your salary is lower than your peers should, if anything, make you happier with your job, since it probably means your future earnings have nowhere to go but up. However, in recent years, economics has become both more social and behavioral, borrowing evidence and ideas from elsewhere in the social sciences. Economists now acknowledge that we constantly judge our own accomplishments in comparison to others, and salaries serve as one ready benchmark. People (and perhaps monkeys, too) are also averse to inequality—unequal pay for equal work just isn’t fair (especially if you’re the one who drew the short straw).

How important is one’s place on the salary totem pole in determining one’s happiness? It turns out to be a very difficult question to answer. Many employers have salary disclosure policies that allow employees to make the comparison on their own, and a number of government entities have publicly disclosed the earnings of all employees. But finding a comparison group—a set of similar individuals with comparable earnings who are unable to benchmark their salaries against those around them—is a challenge: Researchers themselves can’t observe the distribution of earnings if salaries are kept confidential.

But following a court ruling on California’s “right to know” law in March 2008, the Sacramento Bee put up a Web site listing salaries for all state employees. (Previously, this information had been private.) Berkeley economists David Card, Enrico Moretti, and Emmanuel Saez along with Alexandre Mas of Princeton quickly took advantage of this opportunity to see how new access to salary information affected workplace attitudes or job search decisions. The researchers reasoned that most state employees were likely unaware of the Web site or hadn’t taken the time to seek it out. Of course, the ones who had used the Web site and the ones who had not were probably different in many ways to begin with. The ones who chose to look at the wage data were probably more focused on money, more concerned with the earnings of others, and more concerned with status in general. To get around this problem, Card and his colleagues decided to compare relatively uninformed employees with a group that the researchers would contact directly with information on the SacBee site—that is, not people who had sought the information out but people who the researchers themselves would encourage to find it.

The researchers downloaded e-mail directories for three University of California campuses (Los Angeles, Santa Cruz, and San Diego *) and in October 2008 began sending out messages to a random set of university employees with the SacBee link enclosed, along with a link to a survey. They found that around 20 percent of respondents had already used the Web site without any prompting by meddling researchers; nearly 30 percent more checked it out after receiving the e-mail. (Women were somewhat less likely to use the site to peek at others’ salaries than men. Yet there were no obvious gender differences in how they responded to the information on the site.) Of those who visited the Web site, more than 80 percent admitted to searching for information on the earnings of others in their department.

About a week after the initial mailing, the researchers sent a further message to all employees at each campus with a set of questions about their jobs and wage satisfaction (from “very satisfied” to “not at all satisfied”), the likelihood they would actively engaging in a job search sometime in the coming year, and their views on inequality in America in general. Because the researchers had sent their earlier round of e-mails to employees at random, any difference in attitudes between the informed group and their peers could be attributed to the fact that they were much more likely to have visited the SacBee site (and then clicked around to find colleagues’ pay).

On average, receiving SacBee information via e-mail had little effect on job satisfaction or job-search plans. But when the researchers divided the sample in half—those above the median pay level for comparable individuals in their department and those below—they found low earners were significantly more likely to report low job and wage satisfaction if they received the SacBee e-mail. The SacBee e-mail had an even greater impact on the likelihood of low wage earners responding that they would be looking for a job in the coming year. (One respondent even sent a note to the researchers letting them know that he handed in his resignation shortly after checking his colleagues’ salaries on the SacBee Web site.) Surprisingly, high earners didn’t revel in their relative superiority—exposure to the SacBee Web site had no effect on their job satisfaction or likelihood of looking for a new job. (The researchers also found that both low and high earners expressed greater concern for income inequality in America after poking around the SacBee’s salary database.)

Given these findings, it’s easy to see why so many companies have salary nondisclosure policies—you just can’t win. Low earners resent their place at the bottom of the pay scale, and you don’t buy any additional loyalty from those earning higher wages, as they probably figure they’re worth it. Yet some HR gurus argue that we’re making a mistake by assuming that shedding some light on the opaque world of employee compensation would bring nothing but headaches. Public salaries might bring a bit of healthy competition among employees—it might encourage workers to be more productive and hence command higher pay. Furthermore, after a string of resignations and complaints, those charged with setting compensation would realize that openness requires that they properly justify their pay decisions. Are the top earners the most productive? Or are they simply the hardest negotiators? Or are they simply lucky—hired during a boom or lured away from another high-paying job?

It’s also possible that the question of salary disclosure may soon be something beyond employers’ control. Already, there exist numerous Web sites—Salary.com and Vault.com to name just a couple—that come pretty close to providing the same information as the Sacramento Bee, albeit for job titles rather than individuals. Almost by definition, half of all employees will find out they’re below the median. Some may be spurred by this knowledge to negotiate higher pay; others will realize it’s time to move on; but the rest will simply have to live with the dissatisfaction of knowing that they aren’t above average after all. Knowledge may be power, but it can also be a blow to the ego.

Correction, Oct. 1, 2010: The article originally referred to San Diego as Santa Diego. (Return to the corrected sentence.)

Like Slate on Facebook. Follow us on Twitter.