Ovarian cancer is the fifth most common cause of cancer deaths in women worldwide. Most cases of ovarian cancer occur in women entering menopause or in age of 50 years onwards. One step to reducing mortality from ovarian cancer is timely detection and effective treatment. Accurate and efficient method is needed for the gaining insight on ovarian cancer, particularly in classification of benign or malignant, as the focus of this paper. There have been many ways used to classify ovarian cancer including machine learning methods. In this paper, we proposed the machine learning method, namely Bagging and Random Forest for the classification into the benign or malignant of ovarian cancer. Bagging method is known to maximize classification and prevent overfitting. Whereas, the Random Forest can produce low errors, and is an effective method for estimating missing data. We use microarray data obtained from UCI Machine Learning Repository downloaded on September 2018. Simulations on training data were carried out with various percentage. In each simulation, accuracy and running time were calculated. The final score of experimental result confirmed that bagging reached 100 % accuracy for 90 % training data, while the Random Forest achieved an accuracy of 98.2 % for 90 % training data.