A theoretical analysis of the phase measurement performance of Shack-Hartmann wavefront sesnor is made based on the analysis of the subaperture centroid detecting error of atmospheric turbulence with Shack-Hartmann wavefront sensor.The phase detecting error of Shack-Hartmann wavefront sensor is not only dependent on the noise of detector,object′s stellar magnitude,but also the characteristics of object and the numbers of subaperture.A relationship of phase probe error of atmospheric turbulence with Shack-Hartmann wavefront sensor is presented in analytic form.