Question: what is the minimum distance from toilet to wall?
Answer: Most codes require at least 15 inches (measured from the center of the toilet) from any side wall or obstruction and not closer than 30 inches center to center to any other sanitary fixture. (The NKBA actually recommends 32 inches.) There should be at least 24 inches of clear space in front of a toilet or bidet.