Educational attainment varies widely across the United States — even within neighborhoods of the same city. However, there are some cities that boast extremely high levels and quality of education. They rank in a list of the most educated cities in America. The ranking considers many factors, including the share of adults with a high school diploma, bachelor's degree, and graduate or professional degree. It also takes into account the quality of the public school system and the region's colleges and universities.

These are the eight most educated cities.

Seattle, Washington

Credit: espiegle/ iStock

Two of the richest people on the entire planet call Seattle, Washington, home. Both the founder of Amazon (Jeff Bezos) and the founder of Microsoft (Bill Gates) live in the city. Seattle made the Forbes list for Best Places for Businesses and Careers. With a close relationship to aeronautical giant Boeing, there are lots of high-paying jobs available, and that draws a crowd of highly-educated individuals. The city is also home to several colleges and universities, including the University of Washington.

Seattle boasts a population where around 35% of the residents over age 25 hold at least a bachelor's degree. That's significantly higher than the national average of 29%.

Boston, Massachusetts

Credit: Sean Pavone/ iStock

Home to some of the most prestigious universities in the world, it's no wonder that Boston makes the list. Housing both Harvard and MIT is impressive enough, but the city is also home to Tufts University and Wellesley College. The people of the greater Boston metropolitan area have plenty of options for their educational endeavors. Since all of these places of learning need educated individuals to run, one of Boston's significant areas of enterprise is education. It also has a thriving biotechnology industry, as well as a meaningful influence in the financial sector.

The percent of people holding at least a bachelor's degree in the Boston area is around 44%.

San Francisco, California

Credit: Eloi_Omella/ iStock

Being home to Stanford, which is in the top 10 list of colleges for the whole country, gives the San Francisco Bay area a boost in its educational rankings. It is also home to Berkeley and Santa Clara, giving the area's residents several top-notch schools where they can expand their minds and opportunities. The area also boasts a growing tech industry that is outpacing other metro areas. Many major companies in the industry are located there to help recruit and maintain top talent. LinkedIn and Instagram are both in San Francisco to take advantage of the workforce.

More than half (52.9%) of the residents over 25 in the area have at least a bachelor's degree, making San Francisco an extremely educated place to live and work.

Madison, Wisconsin

Credit: filo/ iStock

Home to the University of Wisconsin, Madison is an extremely educated city. Financial services make up a major part of the city's industry, and big companies like American Family Insurance are there to take advantage of the pool of talented applicants available. The area also has a growing health technologies industry, anchored by data giant Epic Systems.

Madison's rate of people over 25 holding a bachelor's degree is about 54%, which, again, is significantly higher than the national average (29%).

Raleigh–Durham, North Carolina

Credit: Mark Howard/ iStock

The "Research Triangle" region of North Carolina is made up of three universities: North Carolina State University, Duke University, and the University of North Carolina-Chapel Hill. Together, these institutions provide the region with a plethora of educated people and plenty of work for them to do. The educational entities themselves are the area's top employers, and they provide a wide range of research and teaching positions. Other major employers include health services providers.

Perhaps because there are so many well-educated people coming together in the region, the Research Triangle is also home to many tech start-ups. With more than $1 billion of start-up funding going into the region last year, companies developing everything from drones to sports team scheduling are hard at work in the area.

Washington, D.C.

Credit: f11photo/ iStock

The nature of much of the political work that goes on in Washington, D.C., demands a well-educated group of people. This education is not just for the politicians themselves but also for their support staff and the swarm of reporters and analysts who surround them. The city is also home to both Georgetown and Howard, giving it an educational background with historical roots.

With about 54% of the people over 25 holding at least a bachelor's degree, Washington, D.C., has an impressive educational attainment rate.

San Jose-Sunnyvale-Santa Clara, California

Credit: NicolasMcComber/ iStock

Silicon Valley necessarily attracts a lot of well-educated individuals. People move from all over the world to be in the middle of the technology boom, and that draw means that the San Jose region has risen to the second-most highly educated city in the country. San Jose is home to some huge technology businesses, including Cisco, PayPal, eBay, and Western Digital. These competitive and large companies demand a highly educated workforce.

Recent years have seen start-ups and tech companies in other parts of the country successfully recruiting top talent away from Silicon Valley (in no small part due to the excessive cost of living there). Time will tell how the California cities will respond to the dispersal of technical expertise across the country.

Ann Arbor, Michigan

Credit: Davel5957/ iStock

The University of Michigan (along with its many, many research programs and one of the world's biggest stadiums) is housed in Ann Arbor. The city has had the distinction of being named the most educated city in America for three consecutive years. It has an especially high percentage of people ages 25 to 34 holding bachelor's degrees or higher. In Ann Arbor, around 77% of the population has such an achievement while the national average is only 29%. The University is a major employer, and the healthcare industry makes up a significant bulk of the local economy as well.