Epidemiological studies indicate that risks of certain cancers are increased in individuals hospitalized for type 2 diabetes mellitus (T2DM), which may not be representative of the entire population of T2DM patients as most of them are treated in primary health cares. To examine the subsequent cancer risk in individuals with T2DM from hospitals and primary health cares, and in their siblings and spouses, standardized incidence ratios (SIRs) were used to assess systematically risks of 35 cancer sites/types in individuals with T2DM using a nationwide Swedish database covering the period 1964 through 2010. Increased SIRs were recorded for 24 cancer sites/types in individuals with T2DM. The highest SIRs were for pancreatic cancer and liver cancer (2.98 and 2.43, respectively). A decreased SIR was noted for prostate cancer. Five cancers showed increased SIRs during the whole follow-up period: colon, liver, pancreatic, endometrial, and kidney cancers. T2DM patients in inpatient, outpatient and primary health care showed similar risk patterns. The overall SIRs for cancer in the siblings and spouses of individuals with T2DM were 0.97 and 1.01, respectively. The insulin users showed an overall increased risk of cancer. This study showed increased risks of 24 cancers in individuals with T2DM, but not in their siblings or spouses, suggesting that the profound metabolic disturbances of the underlying disease may explain the observed increases. Further studies examining the endogenous and exogenous factors underlying these associations are needed. This article is protected by copyright. All rights reserved.