Population pyramid is a very popular presentation of the age-sex distribution of the human population of a particular region. The shape of the pyramid shows many demographic, social, and political characteristics of the time and the region. In the paper results of hierarchical clustering of the world countries based on population pyramids are presented. Special attention is given to the shapes of the pyramids. The changes of the pyramids' shapes, and also changes of the countries inside main clusters are examined for the years 1996, 2001, and 2006. Also smaller territorial units of a country can be observed through clusters. To illustrate this, clusters of 3111 mainland US counties in the year 2000 obtained using the hierarchical clustering with relational constraint of countiesć population pyramids are examined. In the paper, the results for clustering into nine main clusters are presented.