Start from the required fixture count (occupant load × occupancy ratio, rounded up). Restroom layout requirements build on that number — you can't lay out rooms until you know how many fixtures are required.
The code generally requires separate toilet facilities for each sex. Small occupant loads, and specific occupancy types, may be served by a single-user facility (see our all-gender restroom guide). The threshold at which separate facilities become mandatory is set in Chapter 29.
Toilet rooms must be reasonably accessible to the people they serve — the code limits the travel distance to a required toilet room and, in many cases, restricts requiring occupants to travel between stories or through certain spaces to reach one. Locating restrooms too far from the served area is a real comment.
Some occupancies — notably those serving the public, like restaurants and mercantile above certain sizes — must provide facilities accessible to customers, not only employees. Don't assume an employee-only restroom satisfies the requirement.
Every required toilet room must comply with accessibility (IBC Chapter 11 / A117.1) — clearances, grab bars, accessible fixtures. (See our accessible restroom guide.)
Model IBC Chapter 29 framing; the adopted edition and local amendments govern. Verify against your codes of record.