As an important structure for generating thrust, the shapes of fish tails have adaptively evolved to achieve great swimming performance through natural selection over hundreds of millions of years. The particular optimal tail shape of fish is not universal for all situations but significantly varies with other factors, such as undulatory kinematics. In this study, using a sharp-interface immersed boundary method with a self-propelled model, we investigated the hydrodynamic performance of swimmers that equipped with three different caudal fins in a common undulatory mode, carangiform locomotion, to determine the optimal shape. The three caudal fins tested are as follows: a round fin emulating that of snakehead fish ( channidae), an indented fin emulating that of saithe ( Pollachius virens), and a lunate fin emulating that of tuna ( Thunnus thynnus). At the regular undulating amplitude A = 0.1 L at the tail tip (L is the body length), the swimmer with the indented tail achieves the highest speed U = 1.45 L/s with a relatively high quasi-propulsive efficiency of η q = 0.324; at a higher undulating amplitude A = 0.15 L, the indented tail swimmer achieves slightly lower speed than the lunate fin swimmer, who has the highest speed (2.06 L/s vs. 2.07 L/s), but the efficiency of the former is higher than that of the latter. Therefore, the indented fin is believed to perform the best among the three fins tested regarding carangiform undulatory swimming. This finding is consistent with observations made on fish in nature, for example, carangiform swimming fish that have been evolving for hundreds of millions of years have a caudal fin similar to the indented caudal fin in the current study.