Where you live might have a huge impact on your wallet — and not just for the reasons you expect.

Most consumers think of affordability when they calculate how their location will affect their finances. But a person’s access to banking accounts, for example, can also have a big effect on a person’s financial well-being. That is partly the basis of a new ranking out by GoBankingRates.com, which created a list of the least and most financially savvy states.

The survey also looked at whether residents in each state saved for emergencies, kept up with debt payments and what portion of consumers used alternative loans, such as payday loans, which are more expensive than most traditional loans.

States were also judged on their policies for teaching children healthy financial habits. The District, for example, ranked eighth on the list of the least financially savvy states largely because high schools are not required to teach economics or personal finance. As of last year, 19 states required grade schools to teach personal finance, and 24 required high schools to teach a course in economics, according to the Council for Economic Education.

At the bottom of GoBankingRates.com’s list were Oklahoma, Kentucky, Nevada and Arkansas. Dead last was Mississippi, which had the highest poverty rate of all 50 states last year, according to a survey by 24/7 Wall St. Possibly because of those money issues, people in Mississippi often lag other states when it comes to saving and investing, according to GoBankingRates.

Sixty-four percent of Mississippi residents do not have an emergency fund, the survey found. Close to half, or 47 percent, of households lack a traditional bank account or need to supplement their accounts with another financial product such as a prepaid card. About 41 percent of consumers turn to nontraditional lenders, such as a payday lender, when they need money, more than any other state.

Many of the states ranked as financially savvy were in the north and northeast, with the top five including Virginia, Minnesota, Utah and New Hampshire. At the top of the list was North Dakota, where consumers were more likely to save, keep up with their debt and learn financial basics at an early age.

Close to 75 percent of North Dakota residents have a savings account and 46 percent have emergency savings, the report found. Only 23 percent of households said they are unbanked or underbanked, according to the report. The state also has a strong financial literacy program, requiring high school students to study personal finance and economics.

Read more: