Having kids is one of life’s greatest experiences. It’s also expensive. Between school supplies and summer camps, sports and doctor’s visits, raising children increasingly takes more and more money. I should know — my wife, Jeanette, and I have four. We’ve been blessed in recent years, but I know what it’s like to start a family and struggle to make ends meet. My parents were immigrants who came to America with virtually nothing, and after I finished law school, I owed more than $100,000 in student loans.

There’s a reason many people feel it’s harder to afford children now than in previous generations. It’s true. According to federal data adjusted for inflation, from 1960 to 2015 the average annual cost of raising a child in a middle-income family rose by over $11,000. It’s now estimated that middle-class parents will spend more than $230,000 over the course of their son or daughter’s childhood — and that doesn’t even include college tuition.

Ask just about any couple and they’ll tell you this absolutely influences their decisions about when to have children and how many to have. As the economist Lyman Stone has shown, by 2012, the average number of children American women intended to have was 2.37, and the total fertility rate was 1.88 — a gap of about 0.5 children on average. Since the 1960s, there has been a consistent gap between intended and total fertility, even as the number of children American women desire to have and the total birthrate have declined over time.

There are many causes for this gap, but the increasing cost of childbearing clearly has played a role in its development. For example, think of families who delayed having children for a few years until they were more financially stable and may not have been able to have as many as they initially wanted. Or parents who wanted more children, but after their first or second realized they couldn’t afford the combined cost of taking care of the child and reducing their work hours. The German economist Anna Raute has isolated this “opportunity cost” of childbearing as a significant factor in fertility decisions.