This article presents a data-based method to estimate and compensate low-frequency disturbance in planar motors on the long-stroke stage of a wafer stage, which is a typical multiple-input multiple-output system. First, a data-based method is introduced to decouple the multiple-input multiple-output system into multi-single-input single-output system, which is crucial for the design of controller and the correction of disturbance estimation in the scanning direction. Second, dominant low-frequency disturbances in the long-stroke stage are analyzed. Third, estimation and compensation method under moving condition is proposed. The compensation method is based on three feedforward tables, and the tables are indexed by trajectory parameters, including velocity and position instead of time in the iterative learning control method. Finally, experiments are performed on the long-stroke stage of a wafer stage to verify the proposed method. Experimental results show that the proposed method can effectively improve the servo performance by reducing the tracking errors by nearly 1/2 in the forward direction and 1/3 in the backward direction and lowering error difference between the forward and backward directions from 5.1 to 1.2 mm.