This study examines the optimal design of a tuned mass damper (TMD) in the frequency domain so that the dynamic response of cantilever beams can be decreased. Random vibration theory is applied to identify the mean square acceleration of the endpoint of a cantilever beam as the objective function to be reduced. In addition, to determine the optimal TMD coefficient of mass, stiffness, and damping, a differential evolution (DE) optimization algorithm is employed. The upper and lower limit values of these parameters are taken into account. A majority of the previous studies have concentrated on determining just the stiffness and damping parameters of TMD. Nonetheless, in this study there is also the optimization of TMD mass parameters to determine the mass quantity. In addition, there has been inefficient use of the stochastic DE optimization algorithm method for the optimization of TMD parameters in previous studies. Hence, to obtain optimal TMD parameters, this algorithm is precisely used on the objective function. Tests are carried out on the cantilever beam with the TMD system following this optimization method with harmonic base excitations that resonate the foremost modes of the beam and white noise excitation. The method proposed here is reasonably practical and successful regarding the optimal TMD design. When a TMD is designed appropriately, the response of the cantilever beam under dynamic interactions undergoes a considerable reduction.