Brain tumor disease is a serious and complex health problem worldwide. Early and accurate detection of brain tumors has a major impact on patient care and prognosis. Magnetic Resonance Imaging (MRI) has become one of the main diagnostic tools in detecting brain tumors, manual interpretation of MRI images requires high clinical expertise and requires a long time. In recent years, advances in deep learning techniques and image processing have opened up new opportunities in the detection of brain tumors via MRI images. Deep learning techniques, especially the use of Vision Transformers (ViTs) models, have been successful in various complex pattern recognition tasks in images. The Vision Transformers model was chosen due to the performance improvements shown in many image recognition tasks, outperforming convolutional neural networks (CNN) based methods. Tensorflow and Keras are used as frameworks for development and training models, which have been proven effective and efficient in various previous studies. This study focuses on the performance of the Vision Transformer (ViT) in detecting brain tumors through two Magnetic Resonance Imaging (MRI) image datasets, with different numbers of datasets, as well as the maximum accuracy value that can be achieved from the ViT architecture. From several experimental parameters on ViT, the number of datasets and iterations, the results obtained from the first dataset with 253 image data obtained an accuracy value of 88%, and in the second study by combining the two datasets, with 3.123 data images obtained an accuracy of 97.9%.