BACKGROUND: Recent studies suggest that cancer increases risk of atrial fibrillation. Whether atrial fibrillation is a marker for underlying occult cancer is unknown. METHODS: We conducted a cohort study (1980-2011) of all Danish patients with new-onset atrial fibrillation. To examine cancer risk, we computed absolute risk at 3 months and standardized incidence ratios (SIRs) by comparing observed cancer incidence among patients newly diagnosed with atrial fibrillation with that expected based on national cancer incidence during the period. RESULTS: Median follow-up time was 3.4 years among 269 742 atrial fibrillation patients. Within 3 months of follow-up, 6656 cancers occurred (absolute risk, 2.5%; 95% confidence intervals [CI], 2.4%-2.5%) versus 1302 expected, yielding a SIR of 5.11; 95% CI, 4.99-5.24. Associations were particularly strong for cancers of the lung, kidney, colon, ovary, and for non-Hodgkin's lymphoma. The SIR within 3 months of follow-up was 7.02; 95% CI, 6.76-7.28 for metastatic and 3.53; 95% CI, 3.38-3.68 for localized cancer. Beyond 3 months of follow-up, overall cancer risk was modestly increased (SIR, 1.13; 95% CI, 1.12-1.15). CONCLUSION: Patients with new-onset atrial fibrillation had a markedly increased relative risk of a cancer diagnosis within the next three months, however, corresponding absolute risk was small.