The purpose of this population-based cohort study is to describe the etiology of invasive and in situ breast cancer, using the Swedish Family-Cancer Database. A total of 1,028,455 women, aged 40-61 years, were followed from 1993 through 2004. Invasive and in situ breast cancer was identified in 27,243 and 3,496 women, respectively, with data on family history, reproductive variables, residential region and socioeconomic status. Relative risks (RRs) and population attributable fractions (PAFs) were estimated by Poisson regression. The overall PAF of invasive breast cancer was 5.3% for family history and 17.9% for reproductive factors. Morphology-specific PAFs were calculated for ductal (family history: 5.2%, reproductive factors: 16.6%), lobular (family history: 6.2%, reproductive factors: 19.9%) and comedo types (family history: 5.2%, reproductive factors: 25.9%). The corresponding PAFs of in situ tumors were higher due to family history and reproductive factors. Family history, late age at first birth and high socioeconomic status were associated with elevated risks in all morphologies, whereas low parity did not have an impact on the invasive and in situ lobular and comedo tumors. The risks for women with a family history were the highest, but these women accounted for the smallest proportion of the cases, thus resulting in the lowest PAFs.