You can be 10 levels apart to gain EXP, but people tend to stick 5 levels apart because you'll be doing poor damage compared to the higher levels.