Analysis of cancer risk in primary immune deficiency (PID) offers insight into the relationship between immune function and cancer. Data on Australian patients (n = 1132) notified voluntarily to the Australasian Society of Clinical Immunology and Allergy PID Registry (1990-2008) were linked with national death and cancer registries. Person-years of follow-up commenced from up to 15 years before registration on the PID Registry or January 1982, the inception of national cancer registration. Site-specific, 5-year age-, sex-, calendar year-, and state-standardized incidence ratios (SIRs) with 95% confidence intervals (95% CIs) were calculated for all cancers except nonmelanocytic skin cancer. During an average of 16 person-years follow-up, a 1.6-fold excess relative risk of cancer was observed (n = 58; SIR 1.60, 95% CI 1.22-2.07) for all PID combined. Relative risk was increased for non-Hodgkin lymphoma (n = 16; SIR 8.82, 95% CI 5.04-14.30), leukemia (n = 4; SIR 5.36, 95% CI 1.46-13.73), and stomach cancer (n = 3; SIR 6.10, 95% CI 1.26-17.84). Excess cancer risk was observed for predominantly antibody deficiencies and other well-defined immunodeficiency syndromes. Results suggest that predominantly antibody deficiencies may be associated with a narrower range of solid cancers than immunodeficiency characterized by predominantly T-cell deficiency, such as iatrogenic and HIV-related immunodeficiency, although this requires confirmation in larger cohorts.