Numerous studies have confirmed a correlation between the restored tooth fracture and the cavity design parameters. Improper geometric design of cavity could increase the unfavorable stresses of remaining tooth structure and cause fracture. However, the quantitative guideline for cavity preparation is unclear. This study developed an automatic mesh generation tool and employed finite element method to examine the stress distribution with different cavity depth designs in class II MOD restoration. The results indicated that for deeper cavity designs the unfavorable stress gradient was evident, therefore, the existence of a pulpal wall is essential.