Every state has at least one town with a median household income thousands of dollars higher than the state's median income, according to a new analysis by 24/7 Wall St. In some states, yhe difference can be drastic. For example, the median income in upscale areas like Scarsdale, N.Y., and Winnetka, Ill., is more than $150,000 higher than the state's median income figure.

Read moreLuxury Home Hotspots

Among 21 states, the median household income in the wealthiest town was more than double the state. What's more, 10 states had a difference of more than $100,000 between towns with the highest and lowest annual incomes.

"The most desirable areas to live often have real estate that only the very affluent can afford," 24/7 Wall St. notes. "These places are often in quiet neighborhoods located within commuting distance of major urban centers, which provide a diversity of jobs and attractions. Not surprisingly, nearly all of the wealthiest towns in each state are suburbs of a major city – usually the biggest city in the state. Most of these affluent suburbs are close enough to require less than an hour commuting time, but far enough outside the city hub to afford peace and quiet."

To identify the wealthiest towns in each state, 24/7 Wall St. analyzed median household incomes for every town with populations of 25,000 or less in each state.

Locate the richest town your state at 24/7 Wall St.

Source: "The Richest Town in Each State," 24/7 Wall St. (June 17, 2015)