Introduction: Determining sex based on cranial characteristics is of great relevance in forensic anthropology. Most studies have employed linear methods (such as logistic regression) for this estimation with accuracies around 70%, rarely exceeding 90% accuracy. Several authors have tested non-linear models such as neural networks, support vector machines, and decision trees with good results, surpassing linear models. Objective: To compare linear models (logistic regression, linear regression, and linear discriminant analysis) with non-linear models (neural networks, extreme gradient boosting, support vector machine, naive Bayes, random forest, decision tree, k-nearest neighbors, and adaptive multivariate spline regression). Materials and Methods: 241 skulls used in this study were obtained from the collection of Center for Study and Research in Anatomy and Forensic Anthropology at Tiradentes University, Farolândia campus in Aracaju, Sergipe. Each skull in the collection has secure detailed records. Eighty-nine skulls with signs of craniotomy (n=58) or damage (n=30) and one unidentified were excluded. The 152 eligible skulls underwent cranial measurements. Using the Anaconda platform and Jupyter editor, the data were divided into a training group (80% of the sample) and then were tested (20% of the sample). Eleven machine learning algorithms, including both linear and non-linear models, were applied. Results: The best machine learning algorithm was a neural network with average accuracy of 93%, after 50 runs. The difference to logistic regression, which had an accuracy of 68%, was significantly (p-value of 0.01016). Conclusion: This study demonstrated the potential of the neural network for solving the sex classification problem. The study has a limitation in that neural networks perform better with a large volume of data, and this study used data from a single center. Nevertheless, in the future, more studies should be conducted testing neural networks with larger samples and skulls from other continents.