More women equals better pay. For proof, check out Detroit.

That's one of the findings from a new study by SmartAsset, which analyzed Census Bureau data for insights about women in technology.

Overall, says the study, women who work in technology earn 75 percent of what men do. And nationally, the tech workforce is 75 percent male. But in cities with a higher proportion of women in the tech community, women's pay tends to be higher as a percentage of men's.

"There is significant positive correlation (49 percent) between tech industry representation for women and pay equity in the 58 cities SmartAsset analyzed," says the study. "While it is impossible to say what exactly causes this this relationship, it is clear that some cities have a better overall culture for women in technology."

Exactly which cities, though, might surprise you. In this year's survey, SmartAsset found that when it comes to pay, the best city for women in technology is far and away Detroit. Women working in Detroit's tech sector actually get paid significantly more than men--122.8 percent of men's pay. Relative to other cities, Detroit’s tech sector has a lot of women, with 44.5 percent of all tech jobs in the city filled by women. Detroit also has extremely high growth in the tech sector, with three-year tech employment growth reaching 32 percent.

In the overall rankings, which include job growth, cost of living, and other factors, Washington, D.C., comes in first, followed by Kansas City and Detroit.

Women do better than men in terms of pay in two other cities, as well. In Kansas City, Missouri, and Indianapolis, women get paid just slightly more than men: 100.8 percent.

The results are especially surprising not only because the magnitude of the difference in Detroit is so big, but because last year, Detroit was nowhere to be found on SmartAsset's list of best cities for women in tech. That's because last year, Detroit's tech community was too small to qualify, according to SmartAsset.

Last year, women in Kansas City, Missouri were getting paid 106.6 percent of what men were, and women in Arlington, Texas were getting paid 107.4 percent of men’s salaries. Those were the highest-ranked cities.

Then there are the cities where statistically, women might do well to rethink their choice of either career or geography. In terms of pay, Jacksonville, Florida, where women get paid 76.7 percent of men in tech, and Durham, North Carolina, where they get paid 76.9 percent, are the worst. (But since they're both above the national average, it would seem that women are paid even more poorly in areas too small to qualify for SmartAsset's analysis.) In the overall rankings, Madison, Wisconsin and Portland, Oregon do the worst.

SmartAsset did not lump together the various Bay Area metros into one measurement. But San Francisco and Oakland, California rank 19 and 20th on the overall list, respectively. In San Francisco, women in tech get paid 83.4 percent of what men do; in Oakland, 81.5 percent.