Chromite, spinel and magnetite compositions from a wide range of geological environments have been accumulated from published and unpublished sources in order to better characterize the spinel-group mineral as a function of environment of formation. Approximately 17 000 analyses have been included in a spinel database. The factors that control the crystallization of spinel-group minerals from a basaltic melt are discussed, and their composition is compared for rocks from various terrestrial environments, including mid-ocean-ridge basalts, ocean-island basalts, boninites, ophiolites, mantle xenoliths and kimberlites. The variation in composition of the spinel-group minerals from terrestrial sources are then compared to that in chondritic meteorites. The composition of chromite in unequilibrated chondrites is consistent with crystallization from a chondritic melt, whereas its composition in equilibrated chondrites is consistent with metamorphism at temperatures in the range of 600-800 degrees C.