To our knowledge, although comparison of chromosomic macrorestriction patterns has become one of the most feasible molecular tools of the current microbial taxonomy, a mathematical approach to optimize the choice of a restriction enzyme among the endonucleases tested for such comparison has not been previously described. The coincidence of restriction patterns for two tested bacterial strains with this chosen endonuclease will ensure a high genetic relatedness between them. We report a mathematical model to determine the probability of hazardously obtaining a particular chromosomic macrorestriction pattern by PFGE and to calculate the optimal number of fragments for its comparison. The model presented allows us to determine the optimal number of fragments in order to compare chromosomic restriction patterns. The model calculates this value as a function of the chromosome size and the restriction site length. The model is not useful for choosing a restriction enzyme previous to experimental steps, but as a tool for the choice of the restriction enzyme that yields the lowest probability of hazardously obtaining coincidences of chromosomic patterns. The applicability of this model has been exemplified by determining the optimal number of fragments for some well-characterized bacteria and by comparing these values with those that have been experimentally used.