If you had to name the best place in the world to find top programmer talent, you’d probably say California, right? But we recently found some compelling data that shows that’s not the case. In fact, not only does California not rank as the top U.S. state for programming talent, but the U.S. doesn’t even rank as the top country.

To find out where the top talent really is concentrated, we analyzed data from Stack Overflow, the dominant Q&A platform for coders, with 3.5 million users. (Alexa ranks Stack Overflow as the 53rd most trafficked site in the world and the 36th most popular site in the U.S. By comparison, general-purpose Q&A site Quora.com ranks only as 164th. Sitepoint, one of the closest competitors to Stack Overflow, ranks 1290th in the world.)

Stack Overflow is a really interesting source of data on the skill level of different coders around the world. Users of the platform vote up or down answers to questions, and based on the answers users provide and the rankings of their fellow users, Stack Overflow literally stack ranks its members. These rankings are by and large impartial, determined by the crowd and based solely on the perceived quality of answers to coding and systems questions.

To find out where the world’s best coders are concentrated, we analyzed the profiles of the top 14,898 users in Stack Overflow -- that is, all the members who have a reputation of 5,000 or more, which is considered an extremely high level of achievement. Here’s what we found.

London Has the Most Top-Ranked Stack Overflow Users

While London has a solid reputation in tech, it's not usually considered on par with San Francisco and the Bay Area in terms of tech talent. Yet London has the highest number of top Stack Overflow members, clocking in with 394 that have a reputation over 5,000. New York City also comes in before San Francisco, with 270 and 269 users respectively. Still, San Francisco has only one-tenth the population of London and New York, so on a per capita basis, the City by the Bay does come out ahead. London, though, is well ahead of New York even though the two megacities have roughly the same number of inhabitants. The upshot? If you want to find a coding unicorn among the masses of programmers, SF remains a good bet, followed by London. (Caveat: Stack Overflow users self-declare their location, so we’re relying on their word here).