That's definitely a matter of opinion. Personally, I think the importance should more be centered on life experience and maturity, rather than age. Depending on the people, a 20 year old might have a lot more in common with a 40 year old than another 20 year old. I think as long as both parties are consenting adults, it's up to you.
I hope it's not 10, my wife and I are 12 years apart. I think it just depends on the two people and if they are compatible or not.
What are you trying to do - saying relationships age gaps should conform to a mathematical equation? So, if it doesn't fit the algorithm, then it is not acceptable? No, no, no! I agree with Ginny's comment.^