Depends on the size and the ability of the horse. If you're cantering in, distance for a one stride in and out is 21 - 24 feet. Trotting in 18'.
Standard math is a based on a 12' stride, and allowing 3' each take off and landing for fences 3' and less; take off allowance should be the same distance as the fence is high. So for a 4' high one stride in and out, you'd open up the distance 2' to allow for the height of the fences.
The object when schooling a horse througth a grid at first is to set the distances comfortably for them, so sometimes a little tweaking is in order to make the distances suit the horse.
When teaching riding school lessons on school horses, I always set the distances shorter to make sure all the schoolies could do it comfortably -- you didn't want a lesson student to take their leg off in the middle and then have the horse add a stride or have the schoolie have to reach for the second fence.
Hope that helps.