At FiveThirtyEight, we use census data all the time to track demographic and social trends, from the aging of the U.S. population to the decline in marriage and shifts in immigration patterns. But the census not only reveals societal changes, it responds to them. This week, we’re examining three changes that the Census Bureau is considering for its 2020 questionnaire. We first looked at how the census counts Arab Americans. In this installment: counting same-sex couples.

Same-sex marriage has gained legal acceptance faster than even its most ardent backers could have believed just a few years ago. Now the Census Bureau is racing to adjust to the fast-changing landscape.

Getting an accurate count of same-sex couples has never been more important. Last year’s Supreme Court ruling striking down the Defense of Marriage Act (DOMA) opened the door to the much more widespread legalization of same-sex marriages. Before the ruling, same-sex marriage was legal in nine states that are home to about 15 percent of the population; today, it is legal in 35 states and the District of Columbia, which together account for nearly two-thirds of the population.

But even as gay marriage has expanded, the Census Bureau has struggled to collect good data on how many couples are taking advantage of their new rights. The bureau has published data on same-sex households since the 2000 census, and in September for the first time included a count of same-sex marriages in its main household statistics. The bureau estimates that more than 700,000 U.S. households are headed by same-sex couples, a bit more than a third of whom are married.

But the Census Bureau has acknowledged that its estimate has significant flaws. As a result, the bureau is considering asking directly about same-sex relationships for the 2020 census. Under the proposed wording, which is not yet final, the census form would for the first time include separate categories for “same-sex husband/wife/spouse” and “same-sex unmarried partner” alongside similar options for opposite-sex couples.

The Supreme Court decision made it easier for the Census Bureau to act. Before the decision, the bureau has had to grapple with how to treat couples who reported being married but lived in states where same-sex marriages were illegal. But after it, the federal government recognizes legal same-sex marriages wherever the couple resides.

“The DOMA ruling kind of clarifies things for us,” said Robert Kominski, assistant chief for social characteristics for the bureau.

Researchers say the change can’t come soon enough. They say the data is crucial to understanding how gay and lesbian couples and their families are faring across the country — whether they tend to be richer or poorer than other households, how their children do in school, or whether they face discrimination in jobs or housing. And advocacy groups said that knowing how many same-sex couples there are and where they live will help them assert their influence. Sarah Warbelow, legal director of the Human Rights Campaign, said even the existing data has proved useful.

“It was incredibly helpful to be able to go to legislators, not only at the federal level but at the state level as well, and say, ‘You know, there are same sex couples raising children in virtually every county in this country, so this should matter to you,’ ” Warbelow said.

Warbelow praised the Census Bureau’s proposal, but she’d like to see more changes. The new question wording would only help quantify the number of people living together in same-sex relationships. But the census still wouldn’t ask about sexual orientation, meaning it wouldn’t do anything to count the number of people who identify as gay, lesbian or bisexual.

“If you’re a single LGBT person, you get missed,” Warbelow said. “It is not a good encapsulation of what the LGBT population looks like.”

The Census Bureau isn’t considering a separate question on sexual orientation. Asking about same-sex marriages only requires a change in wording to a subject that has long been a part of the bureau’s data collection. Sexual orientation, on the other hand, would be an entirely new subject. The decennial census — the form sent to every household in the country — covers only a very small group of topics: age, sex, relationship, and race and ethnicity. The annual American Community Survey covers more subjects, but adding a new question is still difficult; researchers of every stripe would love questions about their particular areas of interest.

But that argument doesn’t apply as readily to another issue: gender identity. The census asks about sex, but it doesn’t provide any option for people who identify as transgender or otherwise fall outside the standard male/female options — an area where good data is sorely lacking.

The government does ask about orientation and gender identity in some specific surveys conducted by the Census Bureau, such as the National Health Interview Survey. But the bureau has no plans to add a question on orientation or to change the way it asks about sex on the main census or American Community Survey. Gary Gates, a UCLA demographer who studies issues of sexual orientation and gender identity, said he thinks the Census will have to adjust how it asks about sex and gender for much the same reason that it has had to rethink its approach to relationships — society’s understanding of the subject is changing.

“We now have all this evidence that our concepts of sex and gender socially are changing, and they will need to respond to that in some way,” Gates said.

The census’s treatment of same-sex couples has already gone through significant changes in recent decades. In the 1990 census, if two people of the same sex reported being married, the bureau would change the reported sex of one member of the couple in official tabulations — after all, same-sex marriage wasn’t legal anywhere in the U.S. at the time. For the 2000 census, the bureau changed its policy and instead showed all same-sex couples as unmarried partners, even if they reported being married. The bureau kept that procedure in place for its main count in 2010 but also published a separate tally of same-sex relationships. That detailed whether couples reported as unmarried partners or as spouses.

In theory, counting same-sex couples should be easy. The census already asks people their sex and how individuals are related to one another, which should be enough to identify same-sex couples.

But when Census Bureau researchers compared their data to state-level marriage records, they discovered a problem: There were far too many same-sex marriages. Moreover, their ages, what states they lived in, and similar characteristics didn’t match up with what they thought they knew about same-sex households. They eventually found the culprit: Many of the supposedly same-sex couples were actually opposite-sex couples where one person’s sex had been misreported. The scale of the problem was striking: More than a quarter of all same-sex couples reported in the census — and nearly two-thirds of all same-sex married couples — were likely to actually be opposite-sex couples. As a result, the initial data significantly overstated the number of same-sex couples.

Researchers traced the problem in part to a poorly designed form that made it easy for people to mis-mark their sex. But more broadly, the issue points to the difficulty of measuring a small minority population. There are about 200,000 same-sex married couples in the U.S., compared to about 56 million opposite-sex married couples. Because of that disparity, even if a very small percentage of opposite-sex couples are misclassified, it can seriously skew the count of same-sex marriages. D’Vera Cohn, a senior writer at the Pew Research Center, uses the analogy of a big pool of red paint and a very small pool of white. A bit of white paint won’t make much difference to the pool of red paint, but even a few stray drops of red will turn the white pool pink.

The Census Bureau has since revised its figures, in part by using an algorithm that looks at people’s names to identify likely errors. A couple named Michael and Rebecca is probably an opposite-sex couple, even if their census form shows Rebecca as a man. But Census Bureau researchers say the new question, if it takes effect, should provide a much more accurate count.

The bureau will run a test of the new wording in 2015. If the test is successful, the new wording could take effect in time for the 2018 or 2019 American Community Survey. To appear on the 2020 decennial census, the bureau will have to get sign-off from Congress as well.

By some standards, however, the Census Bureau is moving relatively quickly. Rose Kreider, chief of the bureau’s Fertility and Family Statistics Branch, noted that it wasn’t until 1990 that the census included a question on cohabiting unmarried partners.

“You could argue we were a few decades late on that,” Kreider said.