(CNN) What's the best country in the world to raise a child? If a well developed public education system tops your list, you'd likely consider the United States -- it took the top spot in education in this year's Best Countries Report, done annually since 2016 by U.S. News & World Report and the Wharton School of the University of Pennsylvania.

But if you factor in such qualities as safety, gender equality, green living, family friendly laws and human rights, you'd look elsewhere. The US came in at number 18 for best country to raise a child, beaten by many countries in Europe, Canada and Australia. Child raising is just one of several categories listed in the survey.

Top marks went to Denmark, Sweden and Norway, a typical trend.

"These countries tend to have generous paternal leave and maternal leave, offer free preschool and have good overall public education systems," said Deidre McPhillips, senior data editor at U.S. News & World Report.

"One area where the US falls behind quite a bit is in the safety metric," she said. "In that attribute, the US actually ranks 32, pretty far down the list. So that really impacts its ratings for raising kids, of course."

Read More