The study aimed to evaluate the macro- and micromineral composition of soil and Gliricidia sepium leaves grown at three different altitudes and to assess their potential contribution as mineral sources for ruminant diets. Soil and Gliricidia sepium leaves were collected from 60 locations across 9 districts in Magelang, Central Java, Indonesia, using purposive sampling based on the largest cattle population and land altitude. The macromineral (Ca and Mg) and micromineral (Fe, Zn, and Cu) contents of the samples were determined using an Atomic Absorption Spectrophotometer. The results showed that lowland areas had higher (P<0.01) Ca and Fe contents in both soil and G. sepium leaves. Meanwhile, the concentrations of Mg, Zn, and Cu in both soil and plant samples did not differ significantly (P>0.01) among altitudes. Higher rainfall at higher altitudes may reduce Ca and Fe uptake due to increased nutrient leaching and changes in soil chemical properties. In addition, differences in temperature between lowland and highland areas might have influenced the Ca and Fe contents. Meanwhile, the Mg, Zn, and Cu contents were relatively stable, were not as easily leached by rainfall, and were less affected by altitude. The macromineral requirements for Ca and Mg in ruminants (beef cattle, dairy cattle, and sheep) were met by G. sepium at low, mid, and high altitudes in Magelang Regency, Central Java, Indonesia. Meanwhile, the micromineral requirements of ruminants were met only for Fe. Supplementation with other forages or feed additives is needed to meet the Zn and Cu requirements of ruminants.