The present work deals with the development of a finite element methodology for obtaining the stress distributions in thick cylindrical HK40 stainless steel pipe that carries high-temperature fluids. The material properties and loading were assumed to be random variables. Thermal stresses that are generated along radial, axial, and tangential directions are generally computed using very complex analytical expressions. To circumvent such an issue, probability theory and mathematical statistics have been applied to many engineering problems, which allows determination of the safety both quantitatively and objectively based on the concepts of reliability. Monte Carlo simulation methodology is used to study the probabilistic characteristics of thermal stresses, and was implemented to estimate the probabilistic distributions of stresses against the variations arising due to material properties and load. A 2-D probabilistic finite element code was developed in MATLAB, and the deterministic solution was compared with ABAQUS solutions. The values of stresses obtained from the variation of elastic modulus were found to be low compared to the case where the load alone was varying. The probability of failure of the pipe structure was predicted against the variations in internal pressure and thermal gradient. These finite element framework developments are useful for the life estimation of piping structures in high-temperature applications and for the subsequent quantification of the uncertainties in loading and material properties.