It is very important to minimize the weight of shaft from the viewpoint of economics and manufacture. For minimizing effectively the diameter of shaft in torsional shafting, authors developed computer program using the real-coded genetic algorithm which is one of optimizing techniques and based on real coding representation of genetic algorithm. In order to confirm the accuracy and effectiveness of the developed computer program, the computational results by the developed program were compared with those of conventional strength, stiffness and vibration designs for a generator shafting.