The productization process of time-grating displacement sensors has revealed that the design of these sensors is primarily focused on the sensor structure itself, lacking a systematic design and optimization method. The design and experimental process are fragmented, making it impossible to fully utilize statistical knowledge to establish a model. The product design heavily relies on the experience of designers, which has significantly constrained the productization process of the sensors. To address the aforementioned issues, this article uses the magnetic field time-grating displacement sensor as the research subject. The experimental design is implemented using the uniform design method, and the experimental results are analyzed using stepwise regression analysis to construct the sensor model design method. Simulation tests and prototype tests are performed, and the results show that the sensor model, built based on this method, exhibits good prediction performance. The established accuracy model fits the simulation data by 89% with a confidence level of over 92% . It can effectively respond to the accuracy of the time-grating sensor, which is of great significance for the optimal design of the time-grating displacement sensor.