This study systematically analyzed the effect of local ordering of B-cations (Zr and Ti) on the electronic, optical, and piezoelectric properties of PbZrxTi1-xO3 (PZT) using density functional theory calculations. The most stable structure found was a tetragonal phase with P4mm symmetry. Other stable phases included a polar orthorhombic phase and a non-polar triclinic phase. Analysis showed that different arrangements of B-cations led to variations in the electronic structure, polarization, and piezoelectric response of the materials. In particular, large piezoelectric coefficients e15 and e33 were associated with specific planar and axial arrangements of