There is a lot of data that does not have a pattern and unbalanced that is difficult to classify, such as the total population of each country in the world is very varied especially when compared with the number of refugees from each of these countries, China and India numbered more than 2 billion people but the number of refugees is only 0, 01%, while Syria around 70% of the 18 million more residents are refugees. By using the K-Means algorithm, we can group countries that have similar characteristics of population and number of refugees, the average percentage of refugees to the population in each cluster is the character of the cluster. The methodology used in this study are: measures the distance of the data using the Euclidean distance formula, runs the K-Means algorithm, calculate the percentage value of each cluster and find conclusions from the characteristics of the clusters formed. We found how machine learning made a pattern of data without political and social issues, the result is K-Means describing machine learning can grouped every country in cluster that make sense.