DESPITE all the partisan bickering, Americans are an increasingly tolerant bunch. A new study published in Social Forces, an academic journal, finds that the country’s attitudes towards once-marginalised groups, such as communists, gays and atheists, have softened considerably since the 1970s. Using the General Social Survey, administered by the University of Chicago since 1972, Jean Twenge of San Diego State University and Nathan Carter and Keith Campbell of the University of Georgia measured how attitudes have changed over time. Their study draws from more than 35,000 responses over three decades. Since the survey began, the proportion of people who feel comfortable with a gay teacher has risen from 52% to 85%. More than three-quarters of respondents in 2012 had no problem with their local library carrying a book by an anti-religious author—up from 63% in the early 1970s. But this growing leniency has its limits: the share of people who would let a racist person speak publicly dropped slightly, from 61% in 1975-79 to 58% in 2010-12. This change might be a little less than expected, but the desire to protect free speech appears to trump other concerns.

Open-mindedness was once the preserve of young people. These days everyone is becoming more tolerant, though social acceptance does decline slightly with age. Women are slightly more accepting than men, and white people appear more tolerant than black people. Those with liberal political views tend to be more accepting, but partisan affiliation has little bearing on these views. The strongest predictor of tolerance, however, is the level of education one has received. College graduates accept outsiders and their views 83% of the time, whereas for those with only a high-school degree the acceptance rate is 64%.

What explains this growth in tolerance? The authors of the report speculate that it has something to do with an increasing mistrust of conventional institutions, such as marriage and the church, and a rise of more individualistic social and sexual mores. In the absence of a single authority or lifestyle paradigm, alternative models and theories can hold more sway. Greater exposure to once-marginal views makes everything seem less threatening. And as unconventional beliefs or ways of life enter the mainstream, such as with same-sex marriage, which is now legal in 36 states, it is often easier to accept this shift than to fight it.

Hate groups still find avid followers, however, according to a recent report from the Southern Poverty Law Centre (SPLC), which monitors such organisations. The number of such groups more than doubled between 1999 and 2011 before waning by 17% to 784 in 2014. Different groups dominate in different states, such as neo-confederates in Mississippi and racist skinheads in New Jersey. Much of their popularity can be explained by increasing economic uncertainty and an inclination to blame financial woes on a black president, according to the SPLC. Some groups are reacting to shifts in convention. In 2010 around 17 groups claimed they were driven by homophobia; by 2014 that number went up to 44.

But as more people embrace more tolerant views, the costs of being conspicuously hateful are rising. A number of public officials have lost their jobs in recent years owing to their affiliation with the Ku Klux Klan (KKK), perhaps the most notorious hate group in America. Membership in the KKK has been falling for years, from a peak in the millions in the 1920s to between 5,000 and 8,000 today. Instead, more people are turning to the anonymity of online spaces, says Mark Potok of the SPLC. As of 2010 there were an estimated 11,500 hate-related sites, including websites, social-network pages and micro-blogs, according to Muslim Advocates, an civil-rights advocacy group.

Despite the public censure, some still prefer to express their prejudice openly. Matthew McLaughlin, a lawyer in California, recently proposed a ballot measure in the state called the “Sodomite Suppression Act”, which would “put to death by bullets to the head or by any other convenient method” anyone who engages in sexual activity with a member of the same sex. Few suspect the measure will gain enough signatures to secure a place on the ballot (indeed, Mr McLaughlin has been widely excoriated for his views). But the move has duly prompted another California resident to propose the “Intolerant Jackass Act”, which would force anyone who pitches a ballot measure that suggests killing gay people to attend sensitivity training and donate $5,000 to a pro-gay or lesbian organisation.