The balance of the sexes affects economic and social relationships within a community. The imbalances in the number of men and women may affect marriages and fertility patterns, labor force participation and the sex roles within the society. Therefore, many types of regional and urban planning such as community services requires sex ratios. First, we show the quantitative procedure to evaluate such imbalance based on a test of statistical hypothesis. Then, we measure such an imbalance of prefectures and cities in Japan.