Accuracy of breast cancer detection using histopathological images is mainly subject to the expertise of physicians. For this reason, there are certain levels of uncertainty during the decision making of breast cancer diagnosis. To increase the certainty of physicians’ decisions, computer-aided medical systems can be used as additional knowledge for diagnosis from histopathological images. Early detection of breast cancer contributes greatly to the survival rate of the patients, which is essentially dependent on the analysis of breast images. In the literature review, few studies have been proposed for breast cancer classification based on histopathological images. However, the performance of current methods is still inefficient and they are incapable for extracting important features from the images due to ineffective hyper-parameters optimization. In this paper, a reliable deep learning approach for breast cancer diagnosis is proposed using a random search algorithm and DenseNet-121-based transfer-learning model. For the transfer learning technique, the pre-trained DenseNet-121 model is adopted due to its capability to strengthen the feature representation and reduce the number of trainable parameters. The use of random search optimization finds the best combinations of hyper-parameters values to improve the accuracy of the classification approach. Several experiments are conducted on a benchmark public dataset of histopathological images with different magnification factors: 40×, 100×, 200×, and 400×. The experiments showed that the proposed approach achieved 98.96 %, 97.62 %, 97.08 %, and 96.42 % of accuracy for 40×, 100×, 200×, and 400× test images, respectively, demonstrating its effectiveness compared to the state-of-the-art models and methods. The reliability of proposed approach is achieved by quantifying the uncertainty of model outcomes using conformal prediction method, guarantying user-chosen levels of confidence.