Not long after Crystal Springs started her new job at a large insurance company in Midtown Manhattan earlier this year, she realized that a much bigger chunk of her paycheck than she expected was going directly to child care for her 5-year old daughter.

Ms. Springs had dreamed that the job, which allowed her and her husband to make about $200,000 a year combined, would help provide a comfortable middle-class life for her family in Ozone Park, Queens. But as bills mounted and her daughter’s routine days off turned into emergencies, she felt stuck. Exasperated, she left the job she had fought so hard to get.

Around the same time, in the Castle Hill section of the Bronx, Doris Irizarry was struggling to sustain the day care center she ran out of her home. Expenses were rising every month, and she said she was making only about $3 a day for each of the six children who attended. She finally closed for good this summer after 25 years.

“This industry is going to die,” she said. “We cannot survive without the parents, and the parents cannot survive without us. We’re a unit.”

In a notoriously stratified city experiencing its worst affordability crisis in decades, the skyrocketing cost of child care is one of the few issues that connects working families across geography, race and social class.

All but the wealthiest New Yorkers — even the upper middle class and especially mothers — are scrambling to afford care that will allow them to keep their jobs. Median prices for nearly every type of child care in New York City have shot up since 2017, according to state surveys of providers. Montessori preschool programs can cost more than $4,000 a month in affluent neighborhoods, and working-class families are stretching their budgets to pay at least $2,000 a month for day care.

And the workers who provide child care are reeling from high costs and are leaving the industry. Many make just over minimum wage, leaving them barely able to afford to stay in New York City or pay for care for their own children.

Interviews with more than three dozen parents, nannies, day care providers and experts revealed a potentially devastating crisis for the future of New York City. In recent years, only the astronomical cost of housing has presented a greater obstacle to working families than the cost of child care, experts said.

A New York City family would have to make more than $300,000 a year to meet the federal standard for affordability — which recommends that child care take up no more than 7 percent of total household income — to pay for just one young child’s care. In reality, a typical city family is spending over a quarter of their income to pay for that care, according to the U.S. Department of Labor.

Though families and providers across the country face the same issues, few cities confront affordability challenges as profound as New York’s. In a city where a second income is all but required for most families, soaring costs strain a patchwork child care system made up of day care centers in family homes, preschool and after-school sites in public school buildings and nannies working in private apartments.

“If people can’t go to work knowing your child is safe, and not break your financial back to do it, then people can’t be here,” said Richard R. Buery Jr., the chief executive of the Robin Hood Foundation, a charity focused on fighting poverty in New York City. “If people can’t be here, they can’t pay taxes, and if people can’t be here, employers won’t be here.”

More than half of New York City families are spending more than they can afford on child care, including both lower-income and higher-income families, according to a recent study by Mr. Buery’s organization.

The long-term consequences for the health of the city are only beginning to be felt, but it is clear that there is a profound economic cost. Parents leaving New York or cutting work hours because of child care cost the city $23 billion in 2022, according to the city’s Economic Development Corporation.

New York is losing families with young children. Between 2019 and the end of 2022, there was a significant drop in the number of families with children under 5 living in the city, according to a recent analysis by New School researchers. Data has shown that Black families in particular have left in significant numbers, citing concerns about affordability. The city has also seen a sharp decline in its public school population.

Brittany Dietz and her husband were not planning to leave when they started researching day care centers near their Greenpoint, Brooklyn, home. They considered hiring a nanny or sharing a nanny with another family to reduce costs. Ms. Dietz, who works in advertising, was not impressed with the options, some of which would have amounted to a second rent. The cost of raising a child in New York helped persuade her and her husband to make their recent move to Cleveland, Ms. Dietz’s hometown.

There, she found six day care centers near their new home, all with space for her 18-month-old, and chose one that costs about $50 a day. Moving, she said, has “opened up a world of possibilities” for her family.

“Nothing really pushes you to leave the city until you have a kid,” she said. “If we could have made it work, we probably would have stayed.”

The costs of care have risen as supply has contracted.

The issues that have long plagued the industry — high staff turnover and a shortage of workers caused by stubbornly low wages, and supply lagging behind parent demand — have only become more acute in the wake of the pandemic.

Some workers have moved to other low-wage industries that have been able to raise pay in recent years, and parents are feeling increasingly squeezed on costs.

The city lost at least a third of its child care workers since the start of the pandemic, and more than half of those who remain qualify for child care subsidies for their own children. The industry’s median hourly rate in the city is just $16.78, according to the Bureau of Labor Statistics, and home-based workers make only $10.61 an hour. A quarter of child care workers in the city live in poverty, and the vast majority are women of color.

Gaping pay disparities between child care workers and public schoolteachers have been an issue for the last two mayoral administrations.

Ms. Hochul added $500 million in the most recent state budget to provide bonuses for child care staff and to help bolster recruiting efforts for centers, along with $100 million to expand child care in areas with few options, and has earmarked nearly $16 million to add new child care centers on city and state university campuses.

And Mr. Adams’s administration has used state funding for child care to provide subsidized vouchers that significantly reduce the cost of care for about 22,000 low-income children, a small fraction of the city’s roughly half a million young children. Starting next month, families of four must make less than $100,0000 a year to qualify and must demonstrate that they need child care because they are working or are pursuing employment or school.

But experts say that none of those efforts have tackled the core issue of extremely low wages for child care employees. Beyond raising pay rates, they said, the city and state could fully fund child care for 3-year-olds, ensure that providers are paid on time and give them more training, and make it easier for New Yorkers to open child care centers, including in their own homes, through tax credits and property tax abatements.

In interviews, several parents whose combined household income was $200,000 a year or more said nannies or day care ranked second on their monthly budget, after rent or mortgage. Many said they were unsure if they would stay in the city if they had a second child, especially those without family nearby to help with babysitting.

One family that earns more than $400,000 began making preliminary plans to leave the city after finding a day care in their Williamsburg, Brooklyn, neighborhood that would cost over $4,700 a month for one of their children to attend full-time in fall 2024.

The burden has fallen especially hard on mothers, many of whom said they had cut back their work hours, moved jobs to have more flexibility to work remotely or stared in disbelief at budgeting spreadsheets that showed well over half — and in some cases nearly all — of their monthly take-home pay going to babysitters or day care centers.

“I found myself apologizing for having to be a mother,” Ms. Springs, the Queens mother, who is now building her notary business, said of her time at the insurance company.

Her first week at that job coincided with her daughter’s school vacation, and she sensed her boss’s mounting frustration as she kept asking to work from home.

Some day care providers said they were deeply sympathetic to the parents they served and have created sliding-scale programs for some families who were struggling to pay day care costs.

Silvia Reyes, a full-time nanny, was making $19 an hour working for a family when she started eight years ago. Since then, everything in her life has gotten more expensive even as she has become the sole financial provider for her mother, her teenage brother and her toddler. Her rent in Sunset Park, Brooklyn, is about $2,000 a month and is set to rise again.

She asked the family she works for in Park Slope, Brooklyn, for a raise to $33 an hour, and they agreed. But even that rate, which is more than many other nannies receive, will not cover the cost of full-time day care.

She has set aside her hopes of having her son socialize with other children during the day, and he now stays at home with his grandmother while Ms. Reyes is at work.

“I can’t have the luxury of sending my kid to a day care if it would cost more than my rent,” she said. “If I don’t get paid well, I can’t afford living here and I can’t afford having my baby and my mom and my brother, and I have to look for another job.”

Irineo Cabreros contributed reporting.