This study investigates the impact of cutout and added masses on the natural frequencies of a beam structure and employs machine-learning algorithms to predict optimal locations for added masses, achieving desired natural frequency ranges. The evaluation utilizes COMSOL MULTIPHYSICS to analyze a beam structure with cutouts and added mass locations, generating a dataset of original natural frequencies. This dataset is utilized to train machine-learning algorithms, and subsequently tested with desired natural frequencies and cutout locations for forecasting optimal added mass positions. Various machine learning methods are explored, and regression metrics including Mean Squared Error (MSE), Root Mean Squared Error (RMSE), Mean Absolute Error (MAE), and R-squared are employed to assess performance. Results indicate that the Extra Trees Regressor demonstrates superior performance, yielding RMSE, MSE, and R-squared values of 0.000579, 3.35537e-07, and 0.999948, respectively. Additionally, the study explores the influence of employing different natural frequencies (modes) as inputs for machine-learning algorithms. Findings reveal that increasing the number of utilized modes enhances machine-learning performance, albeit at the expense of computational time. Overall, this research establishes a novel approach, leveraging machine learning to optimize the placement of added masses for achieving desired natural frequency characteristics in beam structures.