The distance between the toilet's floor drain and the wall is the rough-in, with a standard measurement being 12 inches. The Home Depot explains that the rough-in on an existing toilet can be determined by measuring from the wall behind the toilet to the middle of the bolts on the flange of the floor drain. Occasionally, a 10- or 14-inch rough-in is found in older homes.
Tom Silva of This Old House adds that a certain amount of space is also needed around the toilet to use it comfortably. The International Residential Code requires a minimum side-to-side clearance of 15 inches from the centerline of the toilet to the nearest wall or fixture. This requires a minimum footprint width of 30 inches for the toilet. For the most comfort, House Plans Helper recommends this minimum width be increased to 40 inches, distancing the toilet from any obstacle by 20 inches. The International Residential Code also requires a minimum clearance of 21 inches in front of the toilet. The total depth of a toilet can range from 21 inches to 29 inches, depending on the model. The toilet depth plus front clearance requires roughly 50 inches of total depth. House Plans Helper recommends a total depth of 60 inches for added comfort and front clearance.