The role of stress state and stress gradient in whisker growth in Sn coatings electrodeposited on brass is examined. The bulk stress in Sn coatings was measured using a laser-optics-based curvature setup, whereas glancing angle x-ray diffraction was employed to quantify the stress near the surface; this also allowed studying the role of the out-of-plane stress gradient in whisker growth. Both bulk stress and near-surface stress in the Sn coating evolved with time, wherein both were compressive immediately after the deposition, and thereafter while the bulk stress monotonically became more compressive and subsequently saturated with aging at room temperature, the stress near the surface of the Sn coating continually became more tensile with aging. These opposing evolutionary behaviors of bulk and near-surface stresses readily reveals establishment of a negative out-of-plane stress gradient, which is required for the spontaneous growth of whiskers. The importance of the out-of-plane stress gradient was also validated by externally imposing widely different stress states and stress gradients in Sn coatings using a 3-point bending apparatus. Additional whisker growth occurred in the coatings subjected to external tensile stress; however, this was accompanied by a higher negative out-of-plane stress gradient. The results conclusively demonstrate the important role of the negative out-of-plane stress gradient on whisker growth, as compared to only sign and magnitude of stress.