Leave at least 12″ from a finished wall, so the side of your leg doesn’t hit. In tight spaces, simply dry fit your bowl before you cut the hole for the flange. You might be able to squeeze in a smaller measurement. I would leave 6″ to 8″ on the other side for a vanity or lav. Again if space is a factor, dry fit the fixture before you cut out for the drain line and supplies.