The paper presents an algorithm and software for the optimal design of permanent magnet brushless DC motors. Such motors are powered by DC voltage sources via semiconductor switches connected to the motor phase belts. The software is adjusted to the design of motors with NdFeB high energy density magnets. An attention has been given to issues important in the design of the motors, i.e., permanent magnet selection, structure of magnetic circuit, and armature windings. Particularly, precision of calculation of the permanent magnet operating point, visualization of selection process of the winding belts, and magnetic circuit dimensioning have been investigated. The authors have been trying to make the equations more specific and accurate than those presented in the literature. The user software interface allows changes in the magnetic circuit dimensions, and in the winding parameters. It is possible to examine simultaneously the influence of these changes on the calculation results. The software operates both with standard and inverted (outer rotor) motor structure. To perform optimization, a non-deterministic method based on the evolution strategy (ž + λ) - ES has been used.