I think that whatever you feel is right. I know plenty of people who think more than a one or two year gap is weird, but as this thread shows, there are plenty that think much wider gaps are OK.
I've always found that the "half your age +7" 'rule of thumb' works quite well when trying to think of how likely your lives are to be cohesive. Like if a 20 year old is used to hanging out with 30 year olds, then dating a 30 year old will seem normal, however if he isn't, then a relationship might be difficult. And vice versa.
I think that it's all about how you see them. Do you see them as an equal, or see them as being younger or older.
By last bf was 3 years younger than me, but I often forgot that. It certainly felt like we were the same age, hanging around the same sort of people.