Mammographic density is a strong risk factor for breast cancer (BC) and is reported clinically as part of Breast Imaging Reporting and Data System (BI-RADS) results issued by radiologists. Automated assessment of density is needed that can be used for both full-field digital mammography (FFDM) and digital breast tomosynthesis (DBT) as both types of exams are acquired in standard clinical practice. We trained a deep learning model to automate the estimation of BI-RADS density from a prospective Washington University (WashU) clinic-based cohort of 9,714 women, entering into the cohort in 2013 with follow-up through, October 31, 2020. The cohort included 27% non-Hispanic Black women. The trained algorithm was assessed in an external validation cohort that included 18,360 women screened at Emory from January 1, 2013 and followed through December 31, 2020 that included 42% non-Hispanic Black women. Our model-estimated BI-RADS density demonstrated substantial agreement with the density as assessed by radiologist. In the external validation, the agreement with radiologists for category B 81% and C 77% for FFDM and B 83% and C 74% for DBT show important distinction for separation of women with dense breast. We obtained a Cohen's κ of 0.72 (95% CI, 0.71, 0.73) in FFDM and 0.71 (95% CI 0.69, 0.73) in DBT. We provided a consistent and fully automated BI-RADS estimation for both FFDM and DBT using a deep learning model. The software can be easily implemented anywhere for clinical use and risk prediction.