BRCA1 and BRCA2 Genes
You don't inherit cancer, but you can inherit an increased risk of developing cancer. There are now lab tests done on blood that can tell if you have inherited one of the abnormal high-risk breast cancer-related genes, BRCA1 or BRCA2. If you have such a gene, then your risk of developing breast cancer, particularly at a younger age, is much higher than normal.
If on one side of the family (father's or mother's) there are multiple women with breast cancer, women with breast cancer onset younger than age 50, or women who have both ovarian cancer and breast cancer, then there is concern about the family having a BRCA1 or BRCA2 gene.
Just because you have two or more relatives with breast or ovarian cancer does not mean that you have the hereditary form of breast cancer. Most women with a strong family history of breast cancer and who are at risk for the disease do not have the inherited breast cancer gene. Only about 5 percent of women with breast cancer have the inherited BRCA1 or BRCA2 genes.

