Specialized plant species have long served as geobotanical tools for locating mines and ores. Despite their importance, not much research has been dedicated to studying the ecology of endemic specialized plant species, such as those of gypsum or calcareous habitats. Here we describe and analyze the occurence of endemic plant species in gypsum habitats of the south–central Alborz Ranges (Semnan), Iran, in relation to altitude and soil properties. Ecological data and soil samples were collected from 120 plots along along an altitudinal gradient correlated with differences in soil properties. Forty seven plant species, including 6 species endemic to the Semnan area and 20 species endemic to Iran, were identified. The occurrence of the species were analyzed using canonical correspondence (CCA) and detrended correspondence Analysis (DCA), and based on the results the species were categorized as gypsophytes G1 (1600–2245 m a.s.l.), calciphytes (1500–1700 m a.s.l.), gypsophytes G2 (1300–1600 m a.s.l.) and halophytes (1100–1300 m a.s.l.). Gypsum content, elevation and salinity (Na content) were identified as the environmental factors having the largest effects on vegetation compositon. Endemic Semnan plant species included Astragalus fridae, Euphorbia gypsicola and Gypsophila mucronifolia at higher altitudes, and Astragalus semnanensis, Centaurea lachnopus and Nepeta eremokosmos at lower altitude gypsic soils. More frequent Iranian endemic plant species included Moltkia gypsaceae at higher altitudes, Echinops nizvanus and Acantholimon cymosum at lower altitude gypsic soils, Astragalus glaucacanthos, A. podolobus and A. microcephalus occurring mainly in calcic carbonate soil, and halophyte species such as Artemisia sieberi dominating at lower altitudes with more saline–alkaline soil.