Next-generation financial advisor Personal Capital crunched the numbers to see which states’ residents did the best at saving for retirement, and which did the worst.

Here are the 10 states whose residents are the best prepared, with the highest average retirement balances in the country.

1. Delaware: Average retirement balance $286,277

Delaware plays host to lots of financial firms — in fact, the financial industry is one of the state’s largest.

In addition, because the state bends over backward to businesses, the National Law Review says that more than half of all U.S. publicly traded companies and 63 percent of the Fortune 500 are incorporated in Delaware.

Maybe that’s why the state is tops in retirement savings.

2. Connecticut: $279,367

Connecticut has long had a reputation for being the “bedroom community” for lots of New York City and Boston execs, as well as being the home of lots of the high-net-worth crowd.

Fairfield County, in particular, boasts lots of money management businesses and private equity funds, and of course a number of major insurers are headquartered here — along with casinos for those who like to play the odds in other ways.

With all that financial know-how in residence, it’s not surprising that those who have enough to save for retirement have amassed pretty good balances.

3. New Jersey: $272,919

Just a short (but expensive) commute away from Wall Street, the Garden State is home to business executives, pharmaceutical companies, and — again — casinos.

In the state where memories of Tony Soprano linger, it must be second nature to put a little something aside for a rainy day, lest those halcyon days at the Jersey Shore come to an end.

4. Alaska: $271,196

Eighty-five percent of the state’s budget comes from oil revenues, and 34 percent of its jobs come from the petroleum sector.

Since the state sets aside some of its oil revenues into the Alaska Permanent Fund, and Alaskan families are treated to annual dividends, it’s perhaps a little easier to save such a windfall toward retirement than to watch a weekly or monthly amount add up slowly.

5. New Hampshire: $264,624

Back to the east coast, where preparation for retirement seems to have a distinct priority it lacks elsewhere in the country.

In New Hampshire, that’s perhaps particularly apt, since the state not only plays host to biotech and medical research companies but also to an aging population that’s going to need strong health care services.

An understandable link between business and planning for future retirement?

6. Iowa: $245,071

In Iowa, finance, insurance, and real estate firms provide 20.54 percent of the state’s GDP, followed by manufacturing.

Most of the jobs, however, come from sectors as diverse as education, health care, government, manufacturing, and retail.

The mix provides enough incentive — and funds — for Iowans to rank sixth in the nation in average balances saved for retirement.

7. Maryland: $244,689

As close as they are to Washington, D.C., Maryland residents no doubt appreciate the importance of being prepared financially for whatever might come down the pike.

Bankrate.com only rated it as 32nd best in the country as a place to retire, so maybe those Marylanders are hoping to finance a move to some other state when the big day finally arrives.

8. North Carolina: $241,807

North Carolina is another state in which the financial industry plays a major role as a driver of the economy.

No accident, then, that state residents can count themselves among the 10 best prepared in the country.

9. Michigan: $241,934

Home to the Big Three automakers, Michigan thus has lots of workers who have retirement plans at work.

And with the resurgence in demand for vehicles, thanks to low gas prices, that’s been good news for workers who have obviously been putting money away for the future.

But with 36 percent of the state’s job growth since 2009 coming from temporary and contract jobs, instead of full-time/permanent employment, that could be why the state doesn’t rank even higher for retirement savings.

10. Massachusetts: $241,142

Heavy on business but with a diverse economy, Massachusetts relies on services for a major part of its employment and GDP.

As one might expect for the state that houses Boston, financial services are a significant part of that economy — and, by extension, likely a significant factor in its people’s preparedness for retirement.