A set of benzimidazole (1) and imidazopyridine (II) derivatives that have previously been tested for their antibacterial activities against Bacillus subtilis were analyzed using the quantitative structure-activity relationship (QSAR) method. The activity contributions for structural and substituent effects were determined from the correlation equations, which were derived using all possible combination and stepwise regression techniques. The best equation was chosen among the other equations by considering the various statistical criteria. The resulting QSAR revealed that the activity contributions of benzimidazoles and imidazopyridines against B subtilis depend almost entirely on their relative lipophilic character as defined by their octanol/water partition coefficients, log P. The ideal lipophilic character for the investigated imidazole nuclei has been found to be about 4.9. © 1995 Elsevier, Paris.