A new method is developed for the prediction of cavity on two-dimensional (2D) and three-dimensional (3D) hydrofoils by a potential-based Boundary Element Method (BEM). In the case of specified cavitation number and cavity length, the iterative solution method proceeds by addition or subtraction of a displacement thickness on the cavity surface of the hydrofoil. The appropriate cavity shape is obtained by the dynamic boundary condition on the cavity surface and the kinematic boundary condition on the whole foil surface including the cavity. For a given cavitation number the cavity length of 2D hydrofoil is determined according to the minimum error criterion among different cavity lengths. In the 3D case, the prediction of cavity is exactly the same as in the case of 2D method in span wise locations by the transformation of the pressure distribution from analysis of 3D to 2D. The 3D effects at each span-wise location are considered by the multiplication of the cavitation number by a coefficient. The pressure recovery and termination wall models are used as cavity termination. For the 2D case the NACA 16006 and NACA 16012 hydrofoil sections are investigated for two angles of attack using different cavity termination models. For 3D analysis an application for a rectangular hydrofoil with NACA16006 section is carried out. The results are compared with those of other potential based boundary element codes and a commercial CFD code (FLUENT). The effects of different Reynolds numbers (R-n) on the cavitation behavior are also investigated. The results developed from present method are in a good agreement with those obtained from the others. (C) 2014 Elsevier Ltd. All rights reserved.