For several decades, the work of happiness researchers has consistently pointed to an unintuitive conclusion: Having children doesn’t tend to make people happier, and might even make them less happy.

“That never made any sense [to me],” says David Blanchflower, an economist at Dartmouth College. If having kids makes people less happy, why do so many people do it? Why would people have more than one child after the supposed misery brought by their first? And most puzzlingly of all, why would evolution produce a disincentive to procreate?

Blanchflower has long sought to resolve this mismatch between research and human behavior, and he recently made some headway. In a new working paper, he and his co-author, Andrew Clark of the Paris School of Economics, detailed the importance of a single factor: parents’ financial strain. Subtract the stress of struggling to pay bills from the equation, and the presence of children tends to bring parents happiness.

Read: ‘Intensive’ parenting is now the norm in America

“It’s not that children make you unhappy,” Blanchflower told me. “It’s the fact that they bring lots of expenses and difficulties. You have to buy the milk and the diapers. And that financial pressure gets muddled up with this.”

Blanchflower and Clark reached this conclusion after reviewing data recording the experiences of more than 1 million Europeans over the past decade. Those data, collected by the European Union, captured people’s self-reported satisfaction with their lives as well as their answer to the question “During the last twelve months, would you say you had difficulties to pay your bills at the end of the month?”

The paper, which has not yet been peer-reviewed, points to some other variables that are linked to parents’ unhappiness: Children under the age of 10 appear to bring their parents more happiness than do children a few years over 10. Single parents are, on average, less happy than coupled parents. (And other research indicates that mothers are less happy than fathers.)

So what types of parents, once finances are accounted for, tend to be happiest? “It’s a little hard to answer, but I think the answer is simply, people who are under 45 who are married or living with a partner with young kids,” Blanchflower said.

He also told me he expected that the conclusion of the paper would hold for parents in the U.S., though he hasn’t yet found a good empirical way to investigate if that’s the case. It would not be surprising if it is: Based on data from the federal government, households headed by a married couple earning roughly $60,000 to $105,000 spend, on average, about $250,000 to raise a child from birth through age 17. (That figure doesn’t include college tuition.)

That said, having children can be unpleasant for reasons apart from the financial crunch. As the journalist Jennifer Senior explained in her 2014 book, All Joy and No Fun: The Paradox of Modern Parenthood, today’s parents are living out the consequences of a number of societal trends that have developed over decades.

For one, most parents now tend to be (or at least strive to be) more hands-on than others were in the past. On top of being time-consuming and stressful, this project of engaging with a child’s every utterance and overseeing their every minute of playtime can sometimes be, well, boring—or at least, a lot less satisfying than getting absorbed in a meaningful or mentally stimulating task at work. Another possibility: Because today’s parents tend to have children later in life than those in past generations, they experience the freedoms of being 20-something, only to have them stolen by a small, shrieking being with many demands.

In her book, Senior notes the limits of thinking of happiness as quantifiable. “Meaning and joy have a way of slipping through the sieve of social science,” she writes. She draws a distinction between moment-to-moment happiness and the meaning that parenting can bring over a lifetime. “It may not be the happiness that we live day to day,” she writes, “but it’s the happiness we think about, the happiness we summon and remember, the stuff that makes up our life-tales.” The financial stress of raising kids is real, but some aspects of being a parent can’t get tallied up in a survey.