This includes college and the cost of time, which not everyone pays but I and most lesswrong readers probably would.
EDIT: this was too terse. More on opportunity cost:
Imagine a two-earner household where both people work full time making $32k each. This is below the median for the US, but let's be conservative. Let's say that after going on (unpaid) maternity leave for 6 weeks the mother goes back to work part time, and now makes $18k. The household income has gone down by $14k, which is a real cost of having kids, but this is a cost that is paid out of potential income, not actual income.
The higher your earning capacity, the higher this opportunity cost. Someone who takes the idea of "donate to charity as much as possible" seriously should probably be maximizing earning capacity, and probably earns much more than average. This means they're more likely to put their kid in daycare, and more likely to live in areas where daycare is more expensive, so instead of an opportunity cost we're back to having a real cost. (Daycare can range from $5k/year in the poorest states to $15k/year in the richest, it's higher in cities, and the highest paying jobs tend to be in urban areas in expensive states.)
My hourly rate is $1000/hr. You owe me $1.39 for reading this comment. (Fallacy that time spent in activity X can be converted into dollars at hourly rate to arrive at realistic opportunity cost.)
Seriously in most parts of the world people have kids in order to make more money (e.g. by working more fields). That's one big reason why birthrate inversely correlates with prosperity.
In "The Immorality of Having Children" (2013, pdf) Rachels presents the "Famine Relief Argument against Having Children":
They present this as a special case of Peter Singer's argument from Famine, Affluence, and Morality (1972), which is why they haven't called it something more reasonable like the "Opportunity Cost Argument".
[Note: the use of "Famine Relief" here is in reference to Peter Singer's 1972 example, but famine relief is not where your money does the most good. Treat the argument as "that money would be far better spent on GiveWell's top charities" or whatever organization you think is most effective.]
It's true that having and raising a child is very expensive. They use an estimate of $227k for the direct expenditure through age 18 while noting that college [1] and time costs could make this much higher. Let's use a higher estimate of $500k to account for these. Considered over twenty years, that's $25k/year or $2k/month. This puts it at the top of the range of expenses, next to housing. It's also true that this money can do a lot of good when spent on effective charities. At GiveWell's current best estimate of $2.3k this is enough money to save nearly one life per month. [2]
But perhaps we shouldn't be thinking of this money as an expense at all, and instead more as an investment? Could having kids be a contender for the most effective charity? That is, could having and raising kids be one of the most effective things you could do with your time and money?
For example you could convince your kid to be unusually generous, donating far more than they cost to raise. Except that it's much cheaper to convince other people's kids to be generous, and our influence on the adult behavior of our children is not that big. Alternatively, if you're unusually smart, by having kids you could help make there be more smart people in the future. But how many more generations will pass before we learn enough about the genetics of intelligence to make this aspect of parental genetics irrelevant? Rachels considers the idea that your having children might greatly benefit the world, and rightly finds it insufficient. While your child may do a lot of good, for the expense there are much better options. Having kids is not a contender for the most effective charity, or even very close.
Having kids is a special case of spending your time and money in ways that make you happy. A moral system for human beings needs to allow some amount of this. It's like working for $56k at a job you enjoy instead of getting $72k at a job you like less. [3] Or spending your free time reading instead of working extra hours building up a consulting business. Keeping in mind both the cost and that on average people don't seem to be happier parenting, if having kids is what would make you most happy for the expense in time and money then it seems justified.
(This is how Julia and I thought of it when deciding whether we should have kids.)
I also posted this on my blog.
[1] College is currently in a huge state of flux. Advertised costs are rising far faster than inflation as colleges realize they can get away with near perfect price discrimination in the form of "either pay the extremely high sticker price or give us all your financial data so we can determine exactly how much you can afford." At the same time online courses and mixed models are getting to where they can provide much of the value of traditional lecture courses, and in some ways do better. I have very little idea what to budget for college for a kid born now; likely costs range from "free" to "all you have".
[2] Rachels uses a much lower number:
Their Brenzel citation is to the Vaccine-Preventable Diseases section of the DCP2. The $205 number is "Estimated cost per death averted for the Traditional Immunization Program in Sub-Saharan Africa and South Asia" in table 20.5.
[3] This is a $16k difference, which comes from taking $500k over 20 years and dividing by two for the two parents, and then adding some for taxes. Though the earnings difference is likely to last more like 40 years.