Cancer is a condition that can cause death in which abnormal cells arise and evolve in the body. Furthermore, it has a high mortality rate worldwide and its cases are expected to continue increasing rapidly every year. There are various types of cancers, and an example is Hepatocellular Carcinoma (HCC). This cancer is a general type of primary liver cancer, and is malignant in nature. It is also aggressive, thus, could spread and develop rapidly. The diagnosis of HCC is often made at a late stage because most sufferers do not show distinctive signs. Patients diagnosed at an advanced stage have a low chance of living because their liver has been damaged. Therefore, early diagnosis is needed to increase the survival rate and provide the best treatments to patients. Machine learning can be applied in the medical sector to diagnose diseases with high accuracy. Therefore, this study proposed the Logistic Regression (LR) method to classify HCC data. Based on the data, there were several features available, though, some may not be relevant. Due to this condition, feature selection was needed to increase the accuracy and determine which features were important. Genetic Algorithm (GA) was applied as a feature selection tool and Logistic Regression without feature selection (LR) was compared with Logistic Regression with Genetic Algorithm (LR-GA) to determine which method is best for classifying HCC. Based on the results, LR-GA is a better machine learning method than LR with 93.18%, 90.91%, 95.45%, and 93.12% values for accuracy, recall, precision, and f1-score respectively.