Cation exchange capacity (CEC) reflects the ability of soil to sequester exchangeable cations and is an important indicator of the fertility and environmental quality of agricultural soils. The indoor titration method for determining soil cation exchange is expensive and cumbersome. To this end, 565 soil samples from the 0-20 cm plough layer were collected from farmland in Ningxia, and the parameters of soil pH, organic carbon, and mechanical composition were determined. A field-scale soil cation exchange (CEC) estimation model was constructed using multiple linear regression and machine learning methods to obtain soil CEC values rapidly and accurately. The results showed that: ① The mean CEC value of farmland soils in Ningxia was 9.39 cmol·kg