Every house has a vertical waste stack that extends down to the main sewer, and toilets tie into it by branch lines that are, in most cases, almost horizontal. One of the rules of plumbing is that waste flows downhill, so the branch lines have to have a slope, but it can't be too steep. If it is, water may flow too quickly and leave the solid waste behind to clog the pipes.
Toilet waste systems
Water enters the toilet waste system through the toilet flange, which is a plumbing fitting that serves the extra function of holding the toilet to the floor. From there it flows into the branch line which, depending on the configuration, usually has a bend to bring it almost horizontal. The branch line feeds into a T-fitting attached to the waste stack. The plumbing code limits the length of this branch line depending on the pipe diameter, and it can never be longer than 3 m (10 feet). The branch line must be vented to let air in and keep the water flowing.
Pipe size and water flow
Plumbing waste pipes come in two diameters: 7.5 cm (3 inch) and 10 cm (4 inch). While it seems logical that larger pipes would accommodate heavier water flow and more efficient waste disposal, the opposite is usually true. Water can more easily fill a smaller diameter pipe, and when the pipe is full, there is less chance of water flowing around the solid matter and leaving it behind. As a result, larger diameter pipes usually have to have a gentler slope to ensure that water flows slowly enough to bring the solids with it to the vertical stack. Once in the stack, both fall freely to the sewer.
Whereas if the slope of a toilet waste line is too steep, solid matter may be left behind; if it's too gentle, water won't flow quickly enough and solids will settle out. The plumbing code requires a minimum slope of 3 mm for every 30 cm (1/8 inch per foot) of pipe, but it can be as high as 6 mm per 30 cm (1/4 inch per foot). This means that the outlet for a 3 m (10 foot) length of pipe should be 3.1 to 6.2 cm (1 1/4 to 2 1/2 inches) below the inlet. Larger diameter pipes require a gentler slope than smaller diameter ones, and the slope may have to be increased if the pipes are cast iron instead of plastic.
Incorrect sloping of the brach waste line is one cause of frequent toilet blockages, but there are others. If the vents servicing the branch lines get blocked, a vacuum can develop inside them, holding the water back and allowing solid matter to settle out. It's a good idea to clear the vents by spraying water down the vent openings on the roof before you decide you need to re-plumb the waste lines. Blockages can also be the result of insufficient water released into the pipes by a low-flow toilet. In such cases, the pipes may be sloped correctly, but be too large.