T cells continuously search for antigenic peptides presented on major histocompatibility complexes expressed on nearly all nucleated cells. Because only a few antigenic peptides are presented in a sea of thousands of self-peptides, the T cells have a critical task in discriminating between self- and nonself-peptides. This search process for antigens must be performed with sufficient speed in order to induce a fast response against invading pathogens. This study presents a mathematical framework for analyzing the scanning process of peptides. The framework includes analytic expressions for calculating the sampling rate as well as continuous-systems- and stochastic-agent-based models. The results show that the scanning of self-peptides is a very fast process due to fast off-rates. The simulations also predict the existence of an optimal sampling rate for a certain range of on-rates based on the recently proposed confinement time model. Calculations reveal that most of the self-peptides located within a microdomain are scanned within just a few seconds, and that the T cell receptors have kinetics for self-peptides, facilitating fast scanning. The derived mathematical expressions within this study provide conceptual calculations for further investigations of how the T cell discriminates between self- and nonself-peptides.