A probabilistic approach based on Markov chains for the assessment of pitting and crevice corrosion initiation is proposed. A Markov chain is a stochastic process that undergoes transitions from one state to another through a finite number of possible states, until a so‐called “absorbing state” from which the system has no tendency to evolve is attained. The proposed model calculates the probability to have pitting or to maintain a stable passive condition involving a large number of operating parameters related to both metal and environment: steel chemical composition (namely, the PREN index), chlorides content ([Cl−]), chloride critical threshold ([Cl−]cr), temperature, pH, fluid velocity, electrochemical steel potential, E, presence of crevices. Model and algorithms are mainly based on corrosion data collected from literature. Although the proposed model needs experimental confirmation, the simulations here presented seem acceptable, considering the engineering application of stainless steels.