In this paper, an anisotropic magnetoresistive (AMR) thin film sensor which can be used for magnetic scale has been prepared, and its output voltage is about 4.7–4.9 mV V−1. On the basis of the Stoner–Wohlfarth model and with considering the non-uniformity of the demagnetizing field along the width direction of the strips, both the static and dynamic responses of the AMR sensors have been calculated. The results have shown that the calculated results are in agreement with the experimental data. The magnetization rotation in the magnetic sensor strongly depends on the nonuniform demagnetizing field along the width direction. The magnetization at the center is easily rotated into the field direction, and the magnetization at the edge is difficult to be rotated. The smaller the width of the magnetoresistive strip is, the larger both the demagnetizing field at the edge and the saturation field of the magnetic sensor are. The results are helpful for understanding the magnetization rotation of magnetic sensors and developing the magnetic sensors with high performance.