A modified phase-field model coupled with linear elasticity is formulated to study the effect of ferroelastic domain switching on the deformation behavior of tetragonal-prime yttria-stabilized zirconia. Simulations are performed under uniaxial tension and compression using realistic domain microstructures. This work provides new insights into the mechanism of ferroelastic deformation by studying the evolution of domains under different loading directions and strain rates. The model predicts realistic stress-strain curves consisting of stress-plateaus with accurate domain switching behavior without setting a switching criterion based on a critical stress for nucleation of new domains. The results reveal that the origin of coercive stress lies in the balance between the energy absorbed by the domain switching process and the externally applied energy. Loading in different directions but parallel to the spontaneous strain results in different levels of coercive stress as domain switching absorbs different amounts of energy. For the same reason when the strain-rate increases, the coercive stress also increases. This work establishes the relation between the coercive stress and microstructural changes during ferroelastic domain switching.