This paper investigates a calculation method for the heave and pitch motion of a trimaran, which includes direct and indirect calculation methods. In the direct calculation method, Computational Fluid Dynamics (CFD) simulation is applied to calculate trimaran motion. In the indirect calculation method, there exist three steps to achieve motion calculation: first, a standard wave spectrum is chosen to excite the wave force and moment acting on the trimaran; second, particle swarm optimization (PSO) and polynomial fitting methods are adopted to identify the function of wave force and moment; finally, the mathematical model of the trimaran is established. To compare the effectiveness of the direct and indirect methods, the model test of the trimaran is performed in a towing tank. The results of the model test proved that the direct and indirect methods are all effective for calculating the heave and pitch motions of a trimaran.