AUSTIN (KXAN) — Texans are among the hardest-working people in the country, according to a new study.

The state ranked fifth in the nation in a study by WalletHub.

North Dakota ranked first, with Alaska, Nebraska and South Dakota all outranking the Lone Star State.

The neighboring state New Mexico came in last in the ranking.

The study looked at several factors and gave each state a score out of 100.

Texas received a score of 57.91 points, compared to North Dakota’s 67.80 and New Mexico’s 31.26

The study looked at what it called direct and indirect work factors to determine each state’s score.

Direct factors include the average number of hours worked during the week, employment rates and the share of workers who leave vacation time unused. Direct factors combined for a total of 80 points.

The other 20 points came from indirect work factors, such as average commute times and average leisure time.

The metric that carried the most weight was the average number of hours worked during the week. Texas ranked fourth nationwide in that category, with Alaska ranking first.