From the Topsoil layer to the topmost shoot, it should be 20" to 30" before flipping. Stay closer to 20" if space is restricted, and always keep in mind that the plants will continue to grow taller even after you flip the lights.
A great example in my experience was watching the difference...