The liver is an organ in the body that plays an important role in the production and secretion of the bile. Recently, the number of liver patients are increasing because of the inhalation of harmful gases, the consumption of contaminated foods, herbs, and narcotics. Today, classification algorithms are widely used in diverse medical applications. In this paper, the classification of the liver, and non-liver patients is performed based on a support vector machine (SVM) on two datasets. To this end, the dataset is normalized and then sorted based on a proposed algorithm. After that, the feature selection is performed in order to remove the outliers and missing data. Then, 10-fold cross-validation is used for the data partition. In the end, the classification models of Linear, Quadratic and Gaussian SVM are defined and performance evaluation of the proposed method is investigated by calculation of F1-score, accuracy, and sensitivity. The results show that ILPD data have maximum accuracy, sensitivity, and F1-score of 90.9%, 89.2%, and 94%, respectively, so that a minimum improvement of 17.9% is obtained in accuracy than previous works. Additionally, the highest accuracy, sensitivity, and F1-score of BUPA data is 92.2%, 89%, and 94.3%, separately.