Deformable mirror is the key element for adaptive optical wavefront correction. The number of actuators decides the complexity and cost of adaptive optical system. In this paper computer simulations of wavefront error for fitting different Zernike terms by deformable mirror with different number of actuators are presented. The arrangement of actuator and the influence function of mirror are discussed in respect of fitting error. The minimum number of actuators for fitting different Zernike orders of wavefront are given. Some optical experiments of fitting capability have been done with 19 and 37-element deformable mirrors and a Zygo interferometer.