Stress-compensated cantilevers have been fabricated to measure polysilicon gauge factors. This structure consists of heavily boron-doped silicon, thermal $SiO_2$, LPCVD Silicon Nitride, polysilicon and LTO $SiO_2$. The basic idea of this structure is that external force exerts on freestanding end of the cantilever and induces vertical deflection in the cantilever structure. This deforms polysilicon structures and leads to a resistance change in the polysilicon resistors located at the rim of cantilevers. Polysilicon gauge factor is calculated by measuring the resistance change of polysilicon and the vertical deflection of cantilevers. The analysis of cantilever structure is based on small deflection theory. Stress-compensated cantilever structures have been achieved by multilayer deposition of LPCVD silicon nitride, thermal silicon oxide and LTO silicon oxide films. The stress of each film is +600MPa, -310.7MPa and -549MPa, respectively (+ means tensile stress and - means compressive stress). Finally, the cantilevers are formed by using selective anisotropic silicon etch with P+ silicon as an etch stop. The deflection of cantilevers is detected by using optical microscope with 2um resolution. The resistance of polysilicon is measured by digital multimeter. A gauge factor of -8.9 was measured for polysilicon resistors implanted by phosphorus with a dose of $3×10^{15} (cm^{-2})$.