Whiskering has been a reemerging problem affecting the reliability of lead-free electronics. Although the in-layer strain has long been considered one of the major driving forces for whisker growth, the quantitative understanding of the relationship between stress and Sn whiskering is still limited. To fill this technological gap, we develop an analytical model to express the contribution of strain accumulation to the formation of whiskers. The model predicts the average whisker length by calculating the volume of Sn material reallocated by strain in a single whisker site. We apply this model to analyze strain generation (via thermal expansion mismatch, applied forces, and dynamic recrystallization (DRX) process) and strain relaxation processes (creep-law plasticity and material diffusion). The simulated average whisker length is in good agreement with multiple previous experimental data, and <inline-formula xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink"> <tex-math notation="LaTeX">$R^{2}$ </tex-math></inline-formula> reaches 0.80 after reliable calibration. The sensitivity and uncertainty are conducted to evaluate the reliability of the model in response to variations in external input, including deposition thickness and whisker density. The amount of DRX strain is estimated based on the model results. The application and limitations of the model are theoretically analyzed and discussed.