A quantitative comparison of similar crystal structures is often convenient to cross-check different experimental and/or theoretical structural models of the same phase coming from different sources. It is also important for the identification of different phases with the same symmetry, and it is fundamental for the still open problem of the classification of structures into structure types. In most cases, even if the setting of its space group is fixed, there is more than one equivalent description for a given structure. The existence of various equivalent structure descriptions makes the comparison of different structural models a non-trivial task in general. To deal with it, the program COMPSTRU has been developed, available at the Bilbao Crystallographic Server (http://www.cryst.ehu.es). The program measures the similarity between two structures having the same space-group symmetry (or space groups that form an enantiomorphic pair) with the same or different compositions, and under the condition that the sequence of the occupied Wyckoff positions is the same in both structures (isopointal structures). The efficiency and utility of the program are demonstrated by a number of illustrative examples. It is also shown how the program can be used to outline different structure types within a set of isopointal structures.