Can depend, that's why some people say 17 and others up to 22.
The geometry of the frames are different with size so best to sit on them to see whats comfortable.
Also, if you take it off road, you want a smaller frame with the seat well up. On road, you want a larger frame with the seat down...