The effects of cannabis on lung function remain unclear and may be different from those of tobacco. We compared the associations between use of these substances and lung function in a population-based cohort (n = 1,037). Cannabis and tobacco use were reported at ages 18, 21, 26 and 32 yrs. Spirometry, plethysmography and carbon monoxide transfer factor were measured at 32 yrs. Associations between lung function and exposure to each substance were adjusted for exposure to the other substance. Cumulative cannabis use was associated with higher forced vital capacity, total lung capacity, functional residual capacity and residual volume. Cannabis was also associated with higher airway resistance but not with forced expiratory volume in 1 s, forced expiratory ratio or transfer factor. These findings were similar among those who did not smoke tobacco. In contrast, tobacco use was associated with lower forced expiratory volume in 1 s, lower forced expiratory ratio, lower transfer factor and higher static lung volumes, but not with airway resistance. Cannabis appears to have different effects on lung function from those of tobacco. Cannabis use was associated with higher lung volumes, suggesting hyperinflation and increased large-airways resistance, but there was little evidence for airflow obstruction or impairment of gas transfer.