The ceramic thermal shock resistance is usually determined by a strip or a disk sample. However, sample shape and size have greatly effect on determining the strength of Ultra-high temperature ceramics (UHTCs). Study on the thermal shock resistance of UHTCs with different shape and size is very important. Combining mechanics with oxidation dynamic theory, the present work studied the mechanical behavior of UHTCs under high temperature condition, which is different from the traditional thermal shock theory. The parameters, such as thermal expansion coefficient and Young's modulus, are considered as a function of temperature and incorporated into ANSYS code to calculate the stress field of UHTCs under high temperature condition. The effects of sample shape and size on UHTCs stress are discussed. It is found that the thermal shock resistance of UHTCs is strongly affected by the sample shape and size and this is useful for the characterization of UHTCs on mechanical properties.