Habitat suitability modeling and mapping are important aspects of long-term strategies for sustaining plant ecosystems. In this study, seven state-of-the-art machine learning models including boosted regression tree (BRT), functional discriminant analysis (FDA), generalized linear model (GLM), multivariate adaptive regression splines (MARS), mixture dis-criminant analysis (MDA), random forest (RF), and support vector machine (SVM) were applied to model habitat suitability for Ferula gummosa medicinal plant in the Firozkuh County of Tehran. Different factors that affect the habitat of this plant were prepared for modeling, including slope angle, silt percentage, sand percentage, aspect, annual mean rainfall, clay percentage, topographic wetness index, elevation, distance from rivers, drainage density, annual mean temperature, plan curvature, profile curvature, land use, litho-logical units, and organic carbon. After running the models in R software, their evaluation using various measures (area under the curve, accuracy, precision, F-measure, fallout, true skill statistics, and corrected classify instances) indicated that the RF model was the best one for assessing Ferula gummosa habitat suitability. The SVM, MARS, MDA, GLM, FDA, and BRT models also displayed acceptable performances. The results of our study contribute to the understanding of the stability of the medicinal plant Ferula gummosa and to help avoid its extinction in the future.