In this paper, we propose a technique for modeling the sloshing phenomenon as a pendulum. Sloshing model is generated under gravity conditions for nine inner mass ratios to the storage tank volume and 12 input types. The mass ratio ranges from 10 to 90%, in units of 10%. The input is divided into three types and four levels of magnitude. The particle swarm optimization algorithm, which is a metaheuristic method, is applied to perform the pendulum modeling. The pendulum consists of three variables: the mass ratio of the pendulum to the inner fluid mass, length, and damping coefficient. Using the optimized pendulum modeling variables for 108 cases, we analyze the change in pendulum model parameters due to the variation in the inner fluid mass and input.