To enhance patient longevity and accurately diagnose life-threatening diseases like brain tumors, the initial step of tumor classification holds immense importance. Medical imaging technologies are instrumental in identifying pathological conditions within the brain, with Magnetic Resonance Imaging (MRI) being widely preferred due to its superior image value and non-ionizing radiation properties. The integration of deep learning, a subset of artificial intelligence, has significantly propelled the advancement of brain tumor detection from MRI scans, resulting in enhanced prediction rates. Among the various deep learning algorithms, the Convolutional Neural Network (CNN) is extensively employed for brain tumor analysis and classification. In this study, we conduct a comparative performance analysis of transfer learning-based CNN models, specifically ResNet-177 and Inception-v3, for the automatic prediction of tumor cells within the brain. The pretrained models are trained and validated using a dataset consisting of 900 images and subsequently evaluated on a separate MRI brain dataset comprising 180 images. Our research primarily focuses on leveraging the ResNet-177 and Inception v3 pretrained CNN model to accurately classify the brain tumors, and the model's performance is assessed based on metrics such as accuracy, sensitivity, specificity, and F measure. The outcomes of our study demonstrate that the Inception v3 pre-trained model exhibits highly accurate results, showcasing improved accuracy rates, sensitivity, specificity, and f measure, thereby indicating its efficiency in brain tumor classification.