THE end of a marriage is always sad, but divorce can be particularly devastating for a woman who still wants children but whose fertility is on the decline. Her ex may have many years left to start a new family of his own, but by the time she meets a new partner, it may be too late.

This kind of scenario is playing out at fertility clinics across the country: a couple might have always planned to have kids but then the marriage unraveled; or they might have tried but failed to get pregnant; or they might have one child already, but the woman really wanted another. Now she’s 35. Or 38. Or 41. Could egg freezing help her save the last of her fertility?

That’s the hope of a 38-year-old woman who is a client of Ronald G. Lieberman, a family law attorney in Haddonfield, N.J. Mr. Lieberman is asking his client’s soon-to-be-former husband of eight years to pay $20,000 to cover her egg-freezing procedure, medication costs and several years of egg storage. “When they got married, the expectation was they would start a family,” he told me. “Now she might not have the chance much longer.”

A woman’s window of fertility has always been elusive — doctors can’t identify her exact baby deadline. Yet the science of egg freezing, which allows women to preserve their eggs until they’re ready to reproduce, now enables women to quantify their fertility in a new way.