We introduce an algorithm for wavefront fitting of interferograms with Zernike polynomials. The algorithm is based on a singular value decomposition (SVD). SVD is superior to other reconstruction algorithms to some extent. We also introduce the optimum Zernike mode number. With the optimum number of modes, wavefronts can be expressed more exactly. The F-test has been widely used in many fields, and we introduce it to optical wavefront analyzing. We also do computer simulations of this algorithm. (C) 2002 Society of Photo-Optical Instrumentation Engineers.