The use of caffeine, nicotine and some major metabolites was investigated by wastewater analysis in 13 sewage treatment plants (STPs) across Italy, and their suitability was tested as qualitative and quantitative biomarkers for assessing population size and dynamics. A specific analytical method based on mass spectrometry was developed and validated in raw urban wastewater, and included two caffeine metabolites, 1-methylxanthine and 7-methylxanthine, never reported in wastewater before. All these compounds were found widely at the mu g/L level. Mass loads, calculated by multiplying concentrations by the wastewater daily flow rate and normalized to the population served by each plant, were used to compare the profiles from different cities. Some regional differences were observed in the mass loads, especially for nicotine metabolites, which were significantly higher in the south than in the center and north of Italy, reflecting smoking prevalences from population surveys. There were no significant weekly trends, although the mean mass loads of caffeine and its metabolites were slightly lower during the weekend. Most caffeine and nicotine metabolites fulfilled the requirements for an ideal biomarker for the assessment of population size, i.e. being easily detectable in wastewater, stable in sewage and during sampling, and reflecting human metabolism. Nicotine metabolites were tested as quantitative biomarkers to estimate population size and the results agreed well with census data. Caffeine and its metabolites were confirmed as good qualitative biomarkers, but additional information is needed on the caffeine metabolism in relation to the multiple sources of its main metabolites. This exploratory study opens the way to the routine use of nicotine metabolites for estimating population size and dynamics. (C) 2015 Elsevier Ltd. All rights reserved.