Purpose – The purpose of this paper is to investigate different baffles on mitigating liquid sloshing in a rectangular tank due to a horizontal excitation and to find out the optimal selection of sloshing mitigation for practical applications. Design/methodology/approach – The numerical study is conducted by using a proven improved smoothed particle hydrodynamics (SPH), which is convenient in tracking free surfaces and capable of obtaining smooth and correct pressure field. Findings – Liquid sloshing effects in a rectangular tank with vertical middle baffles, horizontal baffles, T-shape baffles and porous baffles are investigated together with those without any baffles. It is found that the existence of baffles can mitigate sloshing effects and the mitigation performance depends on the shape, structure and location of the baffles. Considering the balance of sloshing mitigation performance and the complexity in structure and design, the I shaped and T shaped baffles can be good choices to mitigate sloshing effects. Practical implications – The presented methodology and findings can be helpful in practical engineering applications, especially in ocean engineering and problems with large sloshing effects. Originality/value – The SPH method is a meshfree, Lagrangian particle method, and therefore it is an attractive approach for modeling liquid sloshing with material interfaces, free surfaces and moving boundaries. In most previous literature, only simple baffles are investigated. In this paper, more complicated baffles are investigated, which can be helpful in practical applications and engineering designs. [ABSTRACT FROM AUTHOR]