Andersen et al. (1985, Biometrics 41, 921-932) gave an estimator of the cumulative relative mortality comparing rates of death in an epidemiologic cohort to an external population as a function of time when covariate information is available on all cohort members. We present an analogous estimator when covariate information is known only on a nested case-control sample. Counting process techniques are used to show that this estimator is almost unbiased and an estimator of its variance is derived. Estimators of the relative mortality function, using kernel smoothing methods, and the average relative mortality over grouped time intervals are also presented. The methods are illustrated by comparing rates of lung cancer mortality in a cohort of Montana smelter workers to that in the United States population.