In this paper, a theoretical mathematical model in conjunction with an electrical generation model is examined. Using a simulated algorithm, the optimal design of a two-mass energy harvester that finds the maximal electrical power will be assessed. Before the optimal design is performed, the influence of the electrical power with respect to design parameters such as the magnet's height, the diameter, the stiffness of the lower springs, the stiffness of the upper springs, the revolution of the lower coil, the revolution of the upper coil, the diameter of the coil's wire, and the electrical resistance of the loading will be analyzed. Results reveal that the design parameters play essential roles in maximizing electrical power. The two mode shapes of the two-mass energy harvester also occur at the targeted forcing frequencies. The electrical power is optimally extracted at the two primary forcing frequencies, i.e. 12 and 30 Hz. Moreover, it is obvious that the induced electrical power of the two-mass energy harvester will be superior to that of the one-mass energy harvester.