How close should an animal allow a potential predator to approach before fleeing to a refuge? Fleeing too soon wastes time and energy that could be spent on other important activities, but fleeing too late is potentially lethal. A model to predict flight initiation distance was developed, based on the assumption that animals would flee at a distance that allows them to reach the refuge ahead of the predator by some margin of safety. This model predicts that (1) flight initiation distance should increase with distance from the refuge (which has been supported by studies on several species) and (2) the rate of increase of flight initiation distance with distance from a refuge should be higher when the refuge is between the predator and prey (prey runs towards the predator) than when the prey is between the predator and the refuge (prey runs away from the predator). Prediction 2 was tested by approaching juvenile woodchucks, Marmota monaxalong an imaginary line between the animal and its burrow entrance and measuring the distance between the observer and the animal at the moment it started its flight. As predicted, the rate of increase in flight initiation distance was higher when the burrow was between the observer and the woodchuck than when the woodchuck was between the observer and the burrow. The slopes were appropriate for predators with pursuit speeds about twice the escape speed of the woodchucks. The difference between the slopes was 1.78 m flight distance/m distance to refuge, close to the value of 2 m flight distance/m distance to refuge predicted by the model. The intercept indicated that woodchucks allowed a margin of safety of about 7.6 m. The model permits quantitative evaluation of the principal elements of flexible escape decisions of animals and provides a measure of how predation risk increases the cost of space use in relation to distance from a refuge.