It’s a troubling mismatch between the supply and demand for classroom teachers. An annual survey of ACT test takers indicates decreasing interest in careers in education just as the need for more teachers is increasing. In addition, the potential teacher pool is even smaller in the subject areas in which teachers are most needed.

ACT Inc.’s new report shows that only 5 percent of nearly 1.85 million 2014 high school graduates intended to become teachers. According to the “Condition of Future Educators’’ study, that percentage has steadily declined for the past four years — from 7 percent in 2010 down to 5 percent last year. During that period, the total number of graduates who planned to work in education decreased more than 16 percent — even though the number of ACT test takers rose 18 percent.

Education has a pipeline problem, and that problem will only get worse unless more intentional efforts are undertaken to attract good candidates into the field.

State departments of education, school districts and schools of education, and other key community members should do more to encourage young people to pursue careers in teaching. As the study recommends, stakeholders should use recruiting drives to attract high-achieving college students who are undecided about a future career.

Alternative pathways to teaching should also be supported to draw candidates from a wider field. States should remove barriers that make it difficult for well-qualified people to become licensed educators.

But just increasing the numbers isn’t enough — quality, subject areas and diversity are important as well. The study points out that students interested in education have lower-than-average achievement levels — particularly in STEM (science, technology, engineering and math) courses. And those are the areas with the greatest needs.

In addition, as the demographics of students change, classrooms need more males and teachers of color. Only about 25 percent of those who expressed interest in teaching were male, and about 30 percent were students of color.

“Quality teaching is a crucial element in getting students ready for college and career, ” said ACT President Jon Erickson. “We must be concerned not only with increasing the overall number of students who plan to become educators but also with attracting more of the best and brightest students to the field.” He called the decrease in student interest “alarming.’’ Federal education reports say that shortages already exist in many states.

The test-taker survey highlights another reason interest in teaching is declining: educator pay and benefits. That’s why, as the study suggests, entry-level salaries should be increased and outstanding teaching should be rewarded.

To close achievement gaps, produce well-prepared youths and fill classroom shortages, more great students must become great teachers.