The viewpoint in this paper is that the distinction of detrital from in-situ precipitated carbonate in stromatolites is vital so thai the appropriate modern analogues can be sought. Reviewing literature on modern stromatolites, it is clear that marine stromatolites are dominated by detrital sediment, although diagenetic processes can obscure the detrital nature of carbonate. In mats in low salinity conditions carbonate is dominantly of precipitate origin, being triggered by photosynthesis. In mats in saline conditions petrographically-similar precipitates occur, apparently triggered variously by photosynthesis, evaporation and organic matter degradation in different cases. Light carbon isotopes in the carbonate are a good pointer to organic degradation as a carbon source. A review of criteria proposed for identifying the origin of carbonate in Precambrian stromatolites shows that in different cases reliable evidence both for sediment incorporation and carbonate precipitation has been obtained, although many arguments are equivocal. The utility of luminescence petrography for positive identification of detritus, and carbon isotope data for identification of carbon sources is outlined. New petrographic and carbon isotope data are presented from four units: Canyon Formation of East Greenland; Draken and Wilsonbreen Formations of Spitsbergen and Atar Group, Mauritania. Although environmentally diverse, each displays evidence for both sediment incorporation and localized carbonate precipitation, although in widely varying proportions. It is recommended that luminescence studies be carried out for stromatolite microstructural work. Carbon isotope data indicate no distinction between early ("inorganic") cements, stromatolitic and non-stromatolitic (dolo)micrites, and indicate a common origin related to water column and microbial mat photosynthesis, variably accompanied by evaporation.