A finite element method for computing viscous incompressible flows based on the gauge formulation introduced in [Weinan E. Liu J-G. Gauge method for viscous incompressible flows. Journal of Computational Physics (submitted)] is presented. This formulation replaces the pressure by a gauge variable. This new gauge variable is a numerical tool and differs from the standard gauge variable that arises from decomposing a compressible velocity field. It has the advantage that an additional boundary condition can be assigned to the gauge variable, thus eliminating the issue of a pressure boundary condition associated with the original primitive variable formulation. The computational task is then reduced to solving standard heat and Poisson equations, which are approximated by straightforward, piecewise linear (or higher-order) finite elements. This method can achieve high-order accuracy at a cost comparable with that of solving standard heat and Poisson equations. It is naturally adapted to complex geometry and it is much simpler than traditional finite elements methods for incompressible flows. Several numerical examples on both structured and unstructured grids are presented. Copyright © 2000 John Wiley & Sons, Ltd.