What is the maximum allowable distance between 3 inch trap and a vent?

What is the maximum allowable distance between 3 inch trap and a vent?