Low hormone levels among persons with osteoporosis may decrease risk of some cancers. Other osteoporosis risk factors, such as smoking and alcohol consumption, however, may increase risk. As these deleterious factors are more often associated with osteoporosis diagnosed prior to age 70 years, cancer risk may be higher in these younger persons than in the general population. To examine this hypothesis, a cohort study of 23,935 persons with osteoporosis was conducted in Denmark. Patients hospitalized with osteoporosis between 1978 and 1993 were identified in the Danish Inpatient Register. Linkage to the Danish Cancer Registry identified all cancer outcomes through 2003. Standardized incidence ratios (SIR) and 95% confidence intervals (95%CI) were calculated to compare cancer incidence in the cohort with that in the general population. Persons diagnosed prior to age 70 years were at increased cancer risk (women: SIR = 1.11, 95%CI = 1.04–1.19; men: SIR = 1.31, 95%CI = 1.13–1.50) due, in part, to increased risks of cancers of the buccal cavity, esophagus, liver, pancreas and lung. Persons diagnosed at ages 70 and older were at decreased risk (women: SIR = 0.91, 95%CI = 0.87–0.96; men: SIR = 0.89, 0.77–1.01) due, in part, to decreased risks of breast, endometrial, colon, rectal and brain cancers in women and prostate cancer in men. These results suggest that risk factors associated with earlier onset osteoporosis may be associated with increased risk of cancer. Conversely, factors associated with later onset osteoporosis may be related to a decreased risk of cancer. © 2007 Wiley-Liss, Inc.