BANGOR, Maine — If you want to become a teacher, Maine is among the toughest places in the country to make a living once you step into the classroom, according to a report released Monday by a finance website.

WalletHub, which regularly releases online state rankings on issues ranging from education to taxes, says Maine is the 45th-best state in the nation to be a teacher, when it comes to such factors as salary and income growth potential, beating out only South Dakota, Missouri, Oregon, Arizona, West Virginia and Hawaii.

“Most educators don’t pursue their profession for the money,” the Wallethub report states. “Despite their critical role in shaping young minds, teachers across the U.S. are shortchanged every year.”

Maine’s public school teachers ranked 48th in average starting salary and 49th in median annual salary, according to the website. Both numbers were adjusted to reflect cost-of-living differences.

The state’s public schools also aren’t getting as much to educate each student as schools in other parts of the country. Per-student spending on public schools ranks 46th in the nation, according to the study.

“The WalletHub survey confirms what teachers all across Maine already know: Our schools are underfunded and teachers are underpaid,” Lois Kilby-Chesley, president of the Maine Education Association, said in an email Monday. “Maine teachers have said for years our schools need more funding in order to provide equal opportunities for all students.”

Maine performed much better in terms of its student-teacher ratio. The state’s small, largely rural population means its classrooms aren’t as crowded as some states. Maine ranked third, just behind Vermont and North Dakota. Maine also ranked close to the middle of the pack — 22nd — in terms of school safety, a metric based on the percentage of public school teachers who reported being threatened or harmed by a pupil in the past year, according to WalletHub.

WalletHub previously classified Maine as having some of the best school systems in the country, ranking the Pine Tree State eighth in the nation in a report released in August. That ranking was based on appearances in the U.S. News and World Report top schools list, graduation and dropout rates, test scores, student-teacher ratios and other factors.

In its latest report, WalletHub indicates that, in addition to low pay, teachers nationwide also face growing pressure to improve the performance of their students and themselves amid shifting expectations and state and national policies.

The Maine School Management Association and Maine Department of Education did not immediately respond to requests for comment Monday.

“Regardless of the issues plaguing the profession, many educators will continue to follow their passion and serve the purpose larger than themselves,” the report states.