BOSTON ( MainStreet) — Oh baby! A study by home-listing site Redfin.com estimates that having an infant will run you $35,000 or more in some U.S. cities to cover the first year's charges for child care, a larger home and other expenses.

"I don't think it's widely understood how much a baby costs," says study author Tommy Unger, who has two young children. "I tend to think of myself as pretty aware of what's going on, but I definitely wasn't aware of the expenses involved."

To peg down how much parents can expect to spend during a newborn's first year, Redfin estimated prices in 40 of America's largest metro areas for:

  • Housing. The site predicted the cost of "upsizing" to a larger place by comparing median prices consumers paid between May 1 and July 30 for two-bedroom houses or condos in each city vs. three-bedroom homes. Redfin then computed the extra mortgage costs you'd face during your child's first year if you bought the larger residence using a 30-year, 4.5% fixed-rate loan.
  • Child care. Redfin projected each city's child-care costs by studying National Association of Child Care Resource and Referral Agencies figures for expenses by state and U.S. Labor Department data for child-care workers' salaries by metro area. Estimates refer to nine months of child care, as the site assumed at least one parent will stay home during a baby's first three months.
  • Energy. Unger says parents typically keep homes hotter in the winter and cooler in the summer to keep babies comfortable. Redfin predicted the added energy costs by multiplying U.S. Census estimates of each metro area's typical home-heating and cooling costs by 20%.
  • Health care. The site theorized that newborns' parents incur $3,000 in extra out-of-pocket medical expenses regardless of where they live. That's based on a 2013 analysis sponsored by the nonprofit organization Childbirth Connection.
  • Baby items. Using BabyCenter.com figures, the site assumed that parents spend about $5,600 regardless of location for a bassinet, pacifiers and everything else other than child care that a newborn requires during its first year.

Add it all up and Redfin predicts that the typical family living in a major U.S. city will spend around $26,100 in baby-related costs between a newborn's delivery date and his or her first birthday.

But the study also found that costs range from as low as $18,600 to as high as $41,700 depending on where you live.

Unger says housing costs account for most of the difference, either directly or by influencing how much money child-care workers earn.

"The hourly wages paid in cities with high home prices tend to be more than they are in lower-cost ones," he says.

Read on to see which cities Redfin found have the highest projected first-year costs for newborn babies, or click here for a rundown of the least-expensive locales.