The rails are 18" long. Make your overhang at least 18 1/2" (including end cap) so that last half inch covers the end of the rails. That last half inch is an aesthetic touch, not functionally necessary.