I understand that you don't need to vent a drain if the trap is within 5 feet (or whatever the code specifies) of a vertical vent/stack. What I don't understand is whether this 5 feet is a measurement of only the horizontal distance from the stack of if it is the total length of the drain run. Can anyone clarify this for me? I am trying to put in a washing machine drain on the second floor of my house, and the machine is within five feet of the stack, however I plan to connect the drain at the stack in the basement (i.e. the drain will have a long vertical drop of about 18 feet). Is this okay provided that my drain trap is horizontally 5 feet away from the stack?