Distance to Wall
The distance from the wall to the middle of the flange opening is 12 inches. Water closet openings are standardized, and this measurement is an industry standard. If you wish to allow a little bit more room from the tank to the wall, this measurement can be a maximum of 14 inches. Any more than 14 inches, and the toilet will appear to be out in the middle of the bathroom.
The location of the water supply outlet is standardized as well. From the floor to the middle of the supply pipe, the distance should be 8 1/4 inches. From the center line of the water closet, it is 6 inches away, toward the left. To lay this out on the wall, first draw the center line of the closet. Draw a parallel line 6 inches away toward the left. On the offset line, draw a cross line 8 1/4 inches up from the floor. The middle of the supply pipe should come out where the crossed lines are. These dimensions can be varied a little bit, since most water closet supply lines are flexible to allow for variations in mounting. Do not vary more than an inch on either measurement, though, since codes may not allow for a wide variance. For example, a stud may be right where the hole is supposed to go, so you have to move the hole over a little bit.
You must allow enough room around the water closet for people to use it comfortably. Allow a minimum of 24 inches from the front of the unit to the nearest object, such as a sink. For the side clearance, allow a minimum of at least 15 inches away from the center line. If any of these clearances are less, a person will be cramped into a small space when using the water closet.