Turn the hours a day spent watching the child and the number of times you are woken at night into time. Then multiply by the hourly wage of the person doing the work. The number you get is usually far larger than the cost of formula and diapers. So it is best to agree on who does what before the baby is born.
From 0 to 3, the money goes mainly to how the child is looked after: yourselves, the grandparents, or someone you hire. From primary school to junior high, it goes mainly to housing and extracurricular costs. After that, it goes mainly to the path of further schooling. The three stretches are spent very differently, and lumping them together only gives a frightening total.
That other people hope you will have a child can count as one of your considerations. But the time and money are recorded on your own account. "Raising a son to provide for old age" (养儿防老) should be counted as a separate item, because it bets on another person's finances and willingness twenty years from now. Also write down the consequences of not having a child, and compare the two sides.