# can two fixtures share one vent at a connection?

I'm trying to figure out how to best plumb the drains for a toilet and tub.

The toilet is going to be 3" drain and go direction to the main vertical stack. The tub is 2" and is going to connect to the 3".

My question is if both the toilet and tub drains can share one vent stack at (or right next to, depending on fittings) where the two connect?

Here's a top-down schematic. The "X" is where I was thinking one vertical vent could go up inside the wall.

                   Toilet (3" drain)
+--+
|  |
|  |
|  |
|  |
+-----------+  +-------------------------------+
|  |
Vent?           |  +--------------+         (wall)
+-----------> | X  -----------+ |
|   /           | |
+-----------+  +------------+ +---------------+
|  |            | |
|  |            | |
|  |            | |
|  |            | |
|  |            | |
To main +  |  |            | |
drain   |  |  |            +-+
|  |  |           Tub (2" drain)
|  |  |
|  |  |
v  |  |
|  |


Will one vertical vent in that spot work code-wise? Or do I need to give each fixture it's on vertical vent that ties together higher up in the wall?

To clarify scale, the toilet will be about 2' from that shared wall, and the tub drain about the same (just on the other side).