Cancer is a major concern for people, and accurately predicting the probability of cancer incidence and mortality is an important research topic. With the development of big data and artificial intelligence technology, a new machine learning model has emerged. Using 72,591 pieces of data, including age, case count, population size, race, gender, site of onset, and year of discovery, we built a machine learning model. Through calculations, we found that the decision tree, random forest, logistic regression, support vector machine, and neural network achieved testing accuracies of 62.11%, 61.68%, 54.53%, 55.72%, and 63.10%, respectively. With the help of this model, scientists and policymakers can accurately predict future cancer incidence and mortality rates through databases, allowing them to make relevant policies (such as timely allocating doctors and medical resources) to better serve the people.