Electrolytes cause the electrolytic reaction of alumina, producing aluminum. Their main component is cryolite. The molecular ratio of electrolytes is an important index to judge the acidity and alkalinity of industrial electrolytes, which are also critical for aluminum electrolysis. The molecular ratio is numerically equal to the molar ratio of NaF to AlF3. The goal of this study was to measure the molecular ratio of electrolytes via laser-induced breakdown spectroscopy (LIBS). First, the micro-morphology, element distribution, and phase structure of industrial electrolytes were analyzed. Second, an artificial neural network (ANN), a support vector machine (SVM), random forest regression (RFR), and gradient-boosting regression (GBR) algorithms were used to establish calibration models for original spectral data and normalized spectral data respectively, and the performances of different models were compared. Calibration models were used to predict independent samples. Finally, partial least squares (PLS) and principal component analysis (PCA) were used to reduce the dimension of the spectral data and screen the variables. Multiple linear regression (MLR), PLS, ANN, and SVM were used to build prediction models based on the new variables screened out, and the generalization abilities of different models were investigated using the leave-one-out cross-validation (LOOCV) method. For the PLS-ANN and PCA-SVM models, the root mean square errors (RMSEs) were 0.100 and 0.136, while the mean relative error (MRE) was 1.204% and 3.142%, respectively. The calibration models were used to test the independent samples, and the measurement results were compared and analyzed. In conclusion, this work provides a temporary new method of testing the electrolyte molecular ratio.