Attention, graduating seniors: One of the best routes to becoming a millionaire just might involve turning around and going back to school—this time as an educator.

That's because teachers and other educators account for 14% of the nation's 8.6 million millionaires. They trail only managers, who represent 21%, but exceed doctors, lawyers, and other professionals, at a combined 11%, according to a first-quarter report by consultant and market researcher Spectrem Group of Chicago. Spectrem defines a millionaire as someone with a net worth of $1 million to $5 million, not counting a primary residence.

Edifying: Some 14% of the nation's 8.6 million millionaires are educators. Some have earned it; others inherit wealth.
William Waitzman for Barron's

In addition to pensions, educators, including college professors, earn "a fair amount," when you factor in publishing, consulting, and summer jobs, says George Walper, Spectrem president and CEO.

"If they're smart at investing, they can do pretty well," he adds.

Educators, like most millionaires, are likely to be part of a two-income household, which could explain their wealth. Indeed, 23% of women in ultra-high-net-worth households say there is at least one teacher at home. Another factor: Some 46% of the educators attribute their wealth to inheritance. That could leave them free to pursue a career regardless of the pay.