Breast cancer is one of the leading causes of mortality among women. In addition, 1 in 8 women and 1 in 833 men will be diagnosed with breast cancer in 2022. The detection of breast cancer can not only lower treatment costs but also increase survival rates. Due to increased cancer awareness, more women are undergoing breast cancer screening, leading to more cases being diagnosed worldwide, but doctors' ability to analyze these images is limited. As a result, they get overloaded leading to misinterpretations. The advent of computer-aided diagnosis (CAD) minimized man's involvement and achieved good results. CAD helps medical doctors automatically detect and analyze abnormalities found in the breast. Such abnormalities may be benign or malignant tumors. The goal of this study is to evaluate the effectiveness of using seven layers to classify breast cancer as either benign or malignant using mammograms. The open-source MIAS dataset of 322 images was used for our study, of which 207 were normal images and 115 were abnormal images. The proposed CNN model convolves an image into seven layers that extract features from the input images, and these features are used to classify breast cancer as malignant or benign. The proposed CNN used a limited data set and achieved the best result compared to previous work. The method achieved results with a 0.39% loss, 99.89% accuracy, 99.85% precision, 99.89% recall, 99.87% F1-score, and an area under the curve noted to be 100.0%. CNN uses a small amount of data to determine abnormalities; the method will assist a medical doctor in determining whether or not a specific patient has cancer.