Cleanouts connected to the drainage system shall be of the
same size as pipe up to 4”(25) and not less than 4” (25) on
larger sizes (and/or as required by local code.) Cleanouts shall
be installed in the building drain as near as practicable to the
inner face of the wall through which the drain passes. Where a
building trap is inside the building, the cleanout shall be
installed at the foot of each vertical sanitary or storm stack; at
the end of drainage lines and at all changes of direction of 45
degrees or more. Cleanouts in horizontal drainage lines shall
be at the intervals of no more than fifty feet on pipe up to 4”(25)
in size and not more than one hundred feet on larger sizes
(and/ or required by local code)