SAN FRANCISCO (CBS SF) — With a steep cost of living and a plethora of tech companies, employees in San Francisco ranked near the top of a recent survey of the nation’s hardest working cities.

WalletHub — a free credit score website — crunched the numbers from 11 key factors to determine where 116 of the nation’s largest cities ranked when it came to the work ethic of its residents.

READ MORE: Downsized But Not Out, Dreamforce Conference Set to Boost Business in San Francisco

Among those factors were the average work week, the employment rate, share of workers not using all their vacation days, average commute time, average leisure time spent per day and share of workers with multiple jobs.

When the scores were added up — Anchorage came in as the top hardest-working city in the U.S. San Francisco came in second, Virginia Beach, Va., third, Cheyenne, Wyoming fourth and Irving, Tex. was fifth.

According to the survey, San Francisco ranked fourth highest in what the WalletHub researchers termed “direct work factors” — length of work week, employment rate and employees not taking their allotted vacation time in a year.

READ MORE: Emmy Awards: 'The Crown' Dominates with Seven Wins

The city did not ranked as well on the negatives or “indirect work factors” impacting employees — average commute time, workers with multi-jobs and average leisure time spent. In those areas, San Francisco was 43 out of the 116 cities.

WalletHub researchers said when it came to hard working, you wanted a high score in “direct work factors” and a lower ranking in “indirect factors.”

In contrast Anchorage ranked four among all cities in direct work factors and eighth in indirect work factors.

MORE NEWS: Flames Reach Ancient Sequoias; Crews in Pitched Battle to Save Giant Forest Grove

Among other major American cities, Washington ranked 8th overall, Seattle 28th, New York 74th, Los Angeles 75th, Pittsburgh 103 and Detroit came in last in 116th. The Motor City ranked 116th in direct work factors and 48th in indirect factors.