Wealth—and religion—drive private school enrollment

As the final wave of kids head back to school this week, for the wealthy, that often means private school.

A new analysis from Trulia, a real estate data firm, showed that the penetration of private school enrollment is highest in the wealthier states as well as in states with strongly religious populations. Some 80 percent of private school students attend religiously affiliated schools.

On average, private school tuition nationwide was $13,640 a year for kindergarten through 12th grade in 2012, according to the Council for American Private Education. However, tuition at some elite high schools now tops $40,000 a year.

Read MoreThe new way to get to college

Among the states with the highest percentage of private school enrollment are Louisiana, Hawaii and the mid-Atlantic states, which outpaced those in the Southwest and Mountain regions.

private school enrollment
Design Pics | Getty Images

When it comes to cities with the highest levels of private school enrollment, the winners tend to be those that are "richer, more educated and more Catholic." Among smaller metro areas with high private school enrollment, two stand out: Lafayette, Louisiana, and Lancaster, Pennsylvania. Both have strongly religious populations, with Lafayette having a large Catholic population and Lancaster, a large Amish population.

Read MoreWealth gap widened over past decade: Report

Within cities, the neighborhoods with the highest private school enrollment are dominated by New York and New Jersey. Monsey, New York, tops the list of neighborhoods, with 86 percent of students enrolled in private school, followed by Armour Hills, Mississippi, (81 percent) and Lakewood, New Jersey (78 percent).

Top 10 metropolitan areas with the highest private school enrollment

U.S. metro area
Percentage of private school enrollment
1 New Orleans, LA 25.1%
2 Honolulu, HI 20.7%
3 San Francisco, CA 19.9%
4 Baton Rouge, LA 19.1%
5 Philadelphia, PA 18.4%
6 Wilmington, DE-MD-NJ 17.6%
7 Cleveland, OH 17.5%
8 Milwaukee, WI 17.0%
9 Cincinnati, OH-KY-IN 16.9%
10 St. Louis, MO-IL 16.7%
Note: Among 100 largest U.S. metros. Grades 1-12 only Source: Trulia

—By CNBC's Robert Frank