Raising a family isn't cheap. In fact, the U.S. Department of Agriculture estimates that the average cost of raising a child is $245,340. But that number is just an average. Here are the top five states where raising a family costs the most money:

Alaska: Groceries cost 26.8 percent more than the national average. Only Hawaii and Connecticut have higher food costs. Monthly rent is among the 10 most expensive in the nation, with a median of $1,837 a month; the median listing price is $250,000.

Montana: It has the ninth-lowest median income in the nation, yet costs are closer to the middle of the pack. The state has no parental-leave policies, and child care rates are well above average, costing families $8,858 a year for an infant and $7,805 for a 4-year-old.

New Mexico: A family with two children under 5 and earning a median income would pay about a third of their take-home pay for full-time child care. Added to the state's lack of parental-leave policies, New Mexico earns its place as third-worst to raise a family on a budget.

New York: It has the highest average child care costs per year: $14,508 for an infant, $12,280 for a 4-year-old and $11,352 for a school-age child. New York also has no parental-leave policy, and families face some of the highest housing costs in the nation.

Hawaii: It takes the No. 1 spot: Food costs 58.2 percent more than the national average, and the median listing price in Hawaii is $539,000.

GoBankingRates.com