Middle-income parents who welcomed a new child last year can expect to spend nearly $300,000 over the next 17 years, according to a new report.

The amount spent on a child by families in the highest income group, on average, was more than twice the amount spent by families in the lowest income group. A child born last year to someone in the lowest income group would cost $212,370 over 17 years, compared to $490,830 for highest earners.

The biggest share of the expense in raising a child, according to the report, is housing at 30%, followed by child-care and education at 18%, food at 16%, transportation at 14% and health care at 8%.