Drain pipe sizing

Count the fixtures on the line and the type of run, and read the minimum drain size straight off the IPC dfu tables.

Result

3 in pipe, minimum
11 dfu on a building drain / sewer at 1/4 in/ft
Max load at 3 in42 dfu
Headroom used26%

The dfu math alone would fit a smaller pipe, but a water closet on the line sets a hard 3″ floor.

Every diameter at true scale — your load: 11 dfu on a building drain / sewer
11¼″31½″212″242½″423″min2164″4805″8406″1,9208″3,50010″5,60012″numbers = max dfu each size carries here · dashed = not permitted at this slope

Formula sources: IPC Table 709.1 — drainage fixture unit values per fixture, IPC Table 710.1(1) — building drains and sewers, max dfu by diameter and slope, IPC Table 710.1(2) — horizontal fixture branches and stacks

Values are the 2021 IPC tables; UPC jurisdictions and local amendments differ, and multi-story stacks also limit what each floor may discharge into the stack (not checked here). Venting is its own chapter. Your inspector's reading of the local code always wins — verify before rough-in.