Becoming a mother used to be seen as a unifying milestone for women in the United States. But a new analysis of four decades of births shows that the age that women become mothers varies significantly by geography and education. The result is that children are born into very different family lives, heading for diverging economic futures.

First-time mothers are older in big cities and on the coasts, and younger in rural areas and in the Great Plains and the South. In New York and San Francisco, their average age is 31 and 32. In Todd County, S.D., and Zapata County, Tex., it’s half a generation earlier, at 20 and 21, according to the analysis, which was of all birth certificates in the United States since 1985 and nearly all for the five years prior. It was conducted for The New York Times by Caitlin Myers, an economist who studies reproductive policy at Middlebury College, using data from the National Center for Health Statistics.

In 2016

Avg. age: 26.3

The difference in when women start families cuts along many of the same lines that divide the country in other ways, and the biggest one is education. Women with college degrees have children an average of seven years later than those without — and often use the years in between to finish school and build their careers and incomes.

People with a higher socioeconomic status “just have more potential things they could do instead of being a parent, like going to college or grad school and having a fulfilling career,” said Heather Rackin, a sociologist at Louisiana State University who studies fertility. “Lower-socioeconomic-status people might not have as many opportunity costs — and motherhood has these benefits of emotional fulfillment, status in their community and a path to becoming an adult.”

There has long been an age gap for first-time mothers, which has narrowed a bit in recent years, driven largely by fewer teenage births, Ms. Myers said. Yet the gap may be more meaningful today. Researchers say the differences in when women start families are a symptom of the nation's inequality -- and as moving up the economic ladder has become harder, mothers' circumstances could have a bigger effect on their children’s futures.

A college degree is increasingly essential to earning a middle-class wage, and older parents have more years to earn money to invest in violin lessons, math tutoring and college savings accounts — all of which can set children on very different paths. Yet an education and a high-paying career also seem out of reach for many people.

Without a college degree

Avg. age: 23.8 With a college degree or higher

Avg. age: 30.3 For unmarried women

Avg. age: 23.1 For married women

Avg. age: 28.8

“These education patterns do help drive inequality, because well-educated women are really pulling ahead of the pack by waiting to have kids,” said Caroline Hartnett, a sociologist and demographer studying fertility and families at the University of South Carolina. “But if going to college and achieving an upper-middle-class lifestyle seems unattainable, then having a family might seem like the most accessible source of meaning to you.”

College is a stronger factor than geography or home prices. The average age of first birth among college-educated women doesn’t vary much between counties with large, expensive cities and those with smaller, more affordable ones. In Hennepin County, the home of Minneapolis, where Zillow says the typical home costs $259,000, the average age of first birth for a college-educated woman is 31. In Brooklyn, where the average home costs $788,000, it’s 32.

Counties with the oldest first-time mothers

When do women enter motherhood in your county?

The gulf aligns with other disparities in the way Americans live — including differing attitudes about the role of women.

The law professors June Carbone and Naomi Cahn described in a 2010 book how red and blue families were living different lives. The biggest differentiating factor, they said, was the age that mothers had children. Young mothers are more likely to be conservative and religious, to value traditional gender roles and to reject abortion. Older mothers tend to be liberal, and to split breadwinning and caregiving responsibilities more equally with men, they found.

“In places where people have children earlier and younger, it doesn’t mean they’re less happy, but they are less gender equal in terms of economics,” said Philip Cohen, a sociologist studying families and social inequality at the University of Maryland.

New parents tend to be older in general. The average age of first-time mothers is 26, up from 21 in 1972, and for fathers it’s 31, up from 27. Women are having babies later in other developed countries, too: In Switzerland, Japan, Spain, Italy and South Korea, the average age of first birth is 31.

In the United States, it increased sharply in the 1970s, after abortion was legalized. Now, more people are going to college and marrying later, and there has been a large decline in teenage pregnancy and a rise in the use of long-acting birth control like IUDs.

But the experiences of American mothers look very different across the country. People are more likely than before to live in places surrounded by people like them. And local factors – job opportunities, housing prices and social mores about things like going to church and using contraception – all influence their family planning.

“It feels like no one here has babies under 35 anymore,” said Mary Norton, interim chair of maternal-fetal medicine at the University of California, San Francisco. Because of fertility treatments and genetic testing, there is less fear about health complications and less stigma about having babies after 35, she said.

By that age, parents are more likely to have one or more degrees and to be planning to invest in their children’s educations. The wage penalty for women who have children is high, so many try to advance in their careers before giving birth. They are more likely than young mothers to be married, and less likely to divorce.

They’re also less likely to live near their children’s grandparents, or because their parents are older, they juggle child care with elder care. And they might have fewer children than they hoped, because fertility declines during a woman’s 30s.

Ellen Scanlon, who lives in San Francisco, became a first-time mother three months ago at age 40. Cayce Clifford for The New York Times

Ellen Scanlon, who lives in San Francisco, became a first-time mother three months ago at age 40. First she went to business school, built a career in finance and started a strategy consulting firm. She met her future husband when she was 31, but they were in no rush to start a family.

“We were just having a really good time,” she said. “We love to travel, we were really happy we found each other, and I think I sort of believed you can have a baby when you want.”

But after they married, when she was 36, they struggled with fertility. It took three and a half years of visiting specialists around the country before she became pregnant via in vitro fertilization.

Being further along in her career gave her flexibility to take time off for treatments and a long maternity leave, she said: “I have more confidence that it’s not going to be that challenging to pull it back together.”

It has also given her and her husband, who works in financial services, enough money to have already started a college savings account for their infant son, Lee, and to be able to enroll him in private school and to travel. “We’re dying to take him places and just show him that the world is large,” she said.

Women who have children young tend to live in areas that view family ties as paramount. Parents might be physically healthier because of their youth, and the children’s grandparents are younger and often live nearby. But parents are less likely to have significant savings or a college degree and career. Their pregnancies are more likely to be unintended, and three-quarters of first-time mothers under 25 are unmarried.

Natalia Maani, an obstetrician at Starr County Hospital in Rio Grande City, Tex., where the average age of first birth is 22, said very few of her pregnant patients are married, and she can count on two hands the number of pregnancies that were planned. Many can’t afford birth control, she said. Most wouldn’t consider abortion, and there is no provider nearby. And the cultural norm is to start families young.

“People here don’t have a population going from high school to college,” she said. “There’s no thoughts about getting your degree, becoming independent or traveling the world.”

Sadie Marie Groff, 28, of Missoula, Mont., with her three sons. She became a mother for the first time at 20. Tim Goessman for The New York Times

Sadie Marie Groff, who lives in Missoula, Mont., was 20 when she had her first son, Dahvon. It wasn’t planned, and she wasn’t married. She had two more boys, Allen and Zayden, with a different man, who is now her husband.

She hadn’t thought much about college before becoming pregnant, she said, but her goal now is to get a degree in radiologic technology, once she has time to take courses. Now 28, she takes care of her children during the day and works three-hour shifts as a health aide at night.

Being a young mother has benefits, she said: “I still have a lot of energy to deal with them, and when they get older, I won’t be too old.”

But it has been financially difficult. When she was pregnant with her second baby, she temporarily moved into a home run by Mountain Home Montana, a nonprofit aimed at helping young mothers. It also provides child care and employment counseling, and she receives government assistance for housing and health care.

Research has shown that where children start in life strongly influences where they end up. Providing resources for young mothers and children — like the program that helped Ms. Groff, and policies like affordable child care and college — can help smooth the differences. “The strategy,” Ms. Rackin, the L.S.U. sociologist, said, “is to provide the best opportunities for children.”