Soft or shifting soils need more depth for lateral stability. Rocky compacted ground holds posts well and can use a shallower embed.
Solid panels act like sails and require deeper embeds in exposed locations. Open-rail designs tolerate more wind with less depth.
Gate posts carry extra load from the swinging gate. Add 6 in (15 cm) to the embed depth.