In my late 20s and early 30s, I thought of myself as an efficiency machine. I got up early to run most days, worked long hours, and frequently had breakfast meetings and evening drinks with sources. I wrote a lot of stories.

“Just wait till you have kids,” said my older sister, who had two kids at the time. “Your productivity will skyrocket.”

I doubted her. My life was already packed full: prolific, busy, and very social. And how could someone with two kids possibly accomplish more than someone with no kids?

Fast forward 15 years, and I get it. I now have two daughters, I’m writing more, even as I work fewer days—all while juggling birthday parties, soccer schedules, homework routines, and endless activities. Research suggests I’m hardly alone. A working paper (pdf) from the Federal Reserve Bank of St Louis indicates that over the lifespan of a 30-year career, women with children outperform childless workers at nearly every stage of the game.

As Olga Khazan has explained, the researchers wanted to test whether parents, especially mothers, were less productive than their peers without kids.

Measuring productivity is tricky. How do you calculate the output of a surgeon, or an engineer, or a manager? And how do you calculate productivity over time?

The researchers turned to academia. They looked at the amount of published research from nearly 10,000 economists, as well as other measures of research productivity such as the quality of the journals in which the professors published. They asked the economists about how many kids they had, when they had them, and their marriage status, and crossed all that with the number of papers they published (acknowledging that lag times in publishing can be long and a bit distorting).

Here’s what they found: In every single time period, women with children are producing more than their peers with none. Kids, it seems, are the ultimate efficiency hack.

This proved to be true despite a significant dip in productivity for mothers of young children. In a finding that will surprise no one with toddlers, women’s productivity dips 15% to 17% when the kids are young, compared to those with no kids. Two preteens are associated, on average, with a productivity loss of 22%, and three preteens with an average loss of 33%. That means “a mother of three children has, on average, a research record reflecting a loss of four years of research output by the time all of her children have reached their teens,” the paper said. A mother with two kids loses about 2.5 years of productivity.

And yet, women are making up for that lost productivity. Christian Zimmermann, one of the authors, told the Washington Post: “While you have small children, it has an impact on you. But after that, it seems that the impact is the other way.”

Women’s productivity advantage also comes despite the “motherhood penalty,” which researchers have noted makes the effects of parenthood significantly worse for women than for men. The reduction in productivity for parents of multiple preteens is 19.1% for mothers, for example, and 5.4% for fathers, the study shows. (It also shows that men with children are more productive than those without, but that changes at the end of their career, when the childless lot pulls ahead.)

So how are these women pulling off their productivity feats with all those dips? The answer seems to be the flip side of the poignant point that the author Gretchen Rubin makes about the fleeting joys of parenting: The days are long but the years are short (video). Children grow up fast, and a career is a long game. The multi-tasking that parents have to do ensures that they’re pretty good at playing it.

Parents’ productivity is an important policy issue. While the gender wage gap has been closing, the family wage gap in the US has widened. Women with children face a wage penalty of around 10% to 15% compared with those without, the study shows (other research shows this gap is smaller in countries with maternity leave coverage).

And the motherhood penalty is real: One study, published in the American Journal of Sociology showed that when people have to decide about hiring fictitious candidates, they discriminate heavily against women perceived to be parents: They think they deserve 7% less in their starting salaries and should get fewer promotions in the future. According to the authors:

Mothers were judged as significantly less competent and committed than women without children… Mothers were also held to harsher performance and punctuality standards. Mothers were allowed significantly fewer times of being late to work, and they needed a significantly higher score on the management exam than non-mothers before being considered hirable.

Not just the numbers

All this is vindicating to us working parents—not because we want to gloat or to make our non-parent colleagues feel bad, but because we always feel guilty dashing out for doctor’s appointments, leaving early for a parent-teacher conferences, and managing a day that starts with getting children to school and ends with a scramble to get dinner on the table.

The economists studied are not “typical” workers, of course. Economists with PhDs are highly-skilled workers, many of whom planned for parenthood. They likely had benefits which many other women do not have access to, including maternity leave and paid sick time, as well as the resources to pay for reasonable childcare. It is easier to be productive when you know your children are safe—a basic assurance that millions of working women do not have.

And the authors note a potential “survivorship bias” here, too: The ones who responded are the ones who stayed in the game. Also, women who get a PhD in economics are a motivated and hyper-organized lot. “If a woman decides to have a kids, that will reduce her productivity, but it seems that women who decide to have kids appear to be more productive in the first place,” said Mattias Krapf, one of the authors of the study.

In other words, female economists make up for the toll of having kids by being hyper-productive before they have kids, and after.

Many working parents, moms in particular, might see themselves in this pattern. There are months, or years, where your productivity tanks. But then, when you emerge from the haze of your kids’ early childhood, you feel conditioned to manage a million things. If you could run a 5K before the kids, you come up for air ready to tackle a triathlon after.

The problem is that the labor market does not recognize this. People don’t stay in jobs very long, and companies aren’t always willing to stick with you through the peaks and troughs. That’s short-sighted, because it benefits companies to support families so their employees want to stick around (and also on the off-chance the company is around for more than 20 years and will need future employees).

My sister now has four kids, and I have two. We’re too busy, and tired, to figure out who’s more productive at this point. But we certainly know we have bested our pre-kid selves.