Longitudinal piezoelectric coefficients (d(33)) of sub-micro Pb(Zr-0.50,Ti-0.50)O-3 thin films were measured using an atomic force microscopy(AFM). The polycrystalline PZT films with (111) preferred orientation were deposited on Pt/Ti/SiO2/Si substrates using a modified sol-gel method. An optimized AFM-based method was proposed in this article, in which a grounded AFM tip contacted with the top electrode, and an ac voltage was applied between the top and bottom electrodes of the piezoelectric films. The electrostatic interaction between the tip and electric field was eliminated in the method. The piezoelectric films showed excellent linear piezoelectric deflection to the applied voltage. In order to quantify the piezoelectric coefficient of the PZT films, a standard X-cut quartz was used to calibrate the deflection of the AFM cantilever. The values of the d33 of a PZT film with 720nm thickness were 14.1pm/V and 68.2pm/V for as-deposited film and the polarized film, respectively. Longitudinal piezoelectric coefficient of PZT crystal with 500 mu m thickness was measured using the AFM method and the traditional quasistatic method which is only used to measure the bulk ceramics, and d33 were 407.4pm/V and 420pm/V, respectively. The excellent coincidence indicates that reasonable piezoelectric constants can be yielded by the optimized AFM method.