It is argued that the best area average of the roughness length zo in heterogeneous terrain is that which, if it applied in homogeneous terrain, would produce the correct spatial average value of the surface stress. A heuristic argument is presented to show that this effective value of z0, zeff0, can be obtained by averaging drag coefficients based on a ‘blending’ height. The blending height of about L/200, where L is the horizontal scale of the roughness variations, is the characteristic height at which the flow changes from equilibrium with the local surface to independence of horizontal position. These calculations are compared with numerical simulations of planetary boundary layer flow over variations in roughness length and show good agreement. The values of surface stress which result are always greater than those which would be deduced by assuming a local flow equilibrium through the whole depth of the boundary layer. For variations of z0 on short length scales, zeff0 approaches the largest values of z0 within the averaging area.