Continuously monitoring its position in space relative to a goal is one of the most essential tasks for an animal that moves through its environment. Species as diverse as rats, bees, and crabs achieve this by integrating all changes of direction with the distance covered during their foraging trips, a process called path integration. They generate an estimate of their current position relative to a starting point, enabling a straight-line return, following what is known as a home vector. While in theory path integration always leads the animal precisely back home, in the real world noise limits the usefulness of this strategy when operating in isolation. Noise results from stochastic processes in the nervous system and from unreliable sensory information, particularly when obtaining heading estimates. Path integration, during which angular self-motion provides the sole input for encoding heading (idiothetic path integration), results in accumulating errors that render this strategy useless over long distances. In contrast, when using an external compass this limitation is avoided (allothetic path integration). Many navigating insects indeed rely on external compass cues for estimating body orientation, whereas they obtain distance information by integration of steps or optic-flow-based speed signals. In the insect brain, a region called the central complex plays a key role for path integration. Not only does the central complex house a ring-attractor network that encodes head directions, neurons responding to optic flow also converge with this circuit. A neural substrate for integrating direction and distance into a memorized home vector has therefore been proposed in the central complex. We discuss how behavioral data and the theoretical framework of path integration can be aligned with these neural data.