The maximum distance from the trap to the vent of a water closet?

The maximum distance from the trap to the vent of a water closet?