The American public is fundamentally divided over whether it’s possible for someone to be a gender different from the sex they were assigned at birth, according to a new Pew Research Center survey. The survey comes amid debates over which public bathrooms transgender individuals should use, how they should be recognized on official documents and whether they should serve in the U.S. military.

Overall, roughly half of Americans (54%) say that whether someone is a man or a woman is determined by the sex they were assigned at birth, while 44% say someone can be a man or a woman even if that is different from the sex they were assigned at birth.

Perhaps not surprisingly, considering the widening partisan divide across a variety of issues, Democrats and Republicans have sharply different views on this question. While eight-in-ten Republicans and Republican-leaning independents say that whether someone is a man or a woman is determined by the sex they were assigned at birth, most Democrats and Democratic leaners (64%) take the opposite view and say a person’s gender can be different from the sex they were assigned at birth.

The survey also finds that Democrats with a bachelor’s degree or more education are more likely than other Democrats to say a person’s gender can be different from the sex they were assigned at birth. About three-quarters (77%) of Democrats with a bachelor’s degree or more say this, compared with 60% of Democrats with some college and 57% of those with a high school diploma or less. No such divide exists among Republicans.

Democrats’ views also differ by race and ethnicity. Some 55% of black Democrats and 41% of Hispanic Democrats say a person’s gender is determined by their sex assigned at birth, a view shared by just 24% of white Democrats.

Millennials are somewhat more likely than older generations to say someone can be a man or a woman, even if that is different from the sex they were assigned at birth. Half of Millennials say this, compared with roughly four-in-ten Gen Xers (41%), Boomers (43%) and members of the Silent Generation (37%).

However, this generational gap goes away when partisanship is taken into account. Majorities of Democrats across generations say someone’s gender can be different from the sex they were assigned at birth, while about eight-in-ten Republican Millennials, Gen Xers, Boomers and Silents say that whether someone is a man or a woman is determined by the sex they were assigned at birth.

Public split over whether society has gone too far or not far enough in accepting transgender people

There is no consensus on whether society has been too accepting of transgender people or not accepting enough. About four-in-ten adults (39%) say society has not gone far enough in accepting people who are transgender, while 32% say society has gone too far and 27% say it has been about right.

Partisanship is at play here as well, as Republicans and Democrats express opposite views. While 60% of Democrats say society hasn’t gone far enough, just 12% of Republicans say the same. Conversely, 57% of Republicans say society has gone too far, compared with 12% of Democrats.

Again, Democrats are divided on this question along educational lines. Roughly seven-in-ten Democrats with at least a bachelor’s degree (72%) say society hasn’t gone far enough in accepting transgender people, compared with 54% of those who did not complete college. There is no education gap among Republicans.

White Democrats (68%) are also more likely to say that society hasn’t gone far enough in accepting transgender people, compared with 46% of black Democrats and 50% of Hispanic Democrats.

People who say they personally know someone who is transgender are more likely than those who do not to say society has not gone far enough in accepting transgender people. About half (52%) of those who know someone who is transgender say this, compared with 31% of those who don’t know a transgender person. This is consistent with previous research that has suggested that people who have gay or lesbian acquaintances are more likely than those who don’t to support same-sex marriage.

The link between knowing someone who is transgender and saying society should be more accepting of transgender people is evident among Republicans and Democrats alike. Among Republicans, 18% of those who know a transgender person say society hasn’t gone far enough in accepting people who are transgender, compared with 10% among those who don’t. The gap is even wider among Democrats: 71% of those who say they know someone who is transgender say society hasn’t gone far enough in accepting transgender people, versus 52% of Democrats who don’t know someone who is transgender.

Nearly four-in-ten say they personally know someone who is transgender

As far as what share of Americans say they know a transgender person, 37% say they personally do, including 13% who say they have a close friend or a family member who is transgender (9% say they have a close friend and 6% have a family member who is transgender; respondents were allowed to select more than one answer). About a quarter of Americans (24%) say they have an acquaintance who is transgender, while 7% say they have a transgender co-worker.

Millennials are the most likely to say they know a transgender person. Some 44% of Millennials say they do, compared with 36% of Gen Xers, 34% of Boomers and 21% of those in the Silent Generation. Younger generations are more likely to say this among both Democrats and Republicans.

Overall, Democrats and Democratic-leaning independents (43%) are more likely than Republicans and Republican-leaning independents (28%) to say they know someone who is transgender.

Note: See full topline results here (PDF).

Anna Brown  is a research associate focusing on social and demographic trends research at Pew Research Center.