The complete piezoelectric tensors of both the wurtzite and zinc blende polymorphs of ZnO and ZnS have been computed by ab initio periodic linear combination of atomic orbitals (LCAO) methods, based mainly on the Hartree–Fock Hamiltonian, with an all-electron Gaussian-type basis set. The computational scheme was based on the Berry phases theory, yielding directly the proper piezoelectric stress coefficients e ik =(∂ P i /∂ ε k ) E ; also the strain coefficients d ik =(∂ ε k /∂ E i ) τ were obtained, by intermediate calculation of the full elasticity tensors of all four crystals. In particular, the e 15 wurtzite shear constants were included for the first time in such calculations. A careful study of the clamped-ion and internal-strain piezoelectric components shows that the latter ones are well simulated by classical point-charge calculations including quantum-mechanical structural relaxation. The much larger piezoelectric response of ZnO with respect to ZnS is explained by analysing signs and ratios of the respective clamped-ion and internal-strain components.