Axon guidance by gradients plays an important role in wiring up the developing nervous system. Growth cones seem to sense a concentration difference across their spatial extent, and convert this into a signal to move up or down a gradient. In this article, a simple mathematical framework is developed to understand when and where gradient detection can occur as a function of gradient shape. This framework is applied to two examples the guidance of axons by target-derived diffusible factors in vivo and in collagen gels, and guidance by substrate-bound gradients of optimal shape, as might be relevant in the retinotectal system. Two distinct spatial limits on guidance emerge: 1 mm for a target-derived diffusible gradient, and 1 cm for a substrate-bound gradient.