I think what matters most is that you're at the same stage and life and have the same goals. If one is looking to settle down and raise a family, but the other is not -- not good. If one is preparing for retirement and the other one has young kids -- not good. If one is enjoying traveling the world and the other is focused on getting through school -- not good.
Also, age difference matters for what *type* of r/ship you want. Some people want an asymmetric r/ship where one partner leads the r/ship -- sets the tone, pace and agenda, and the other follows. Others prefer give and take in a partnership. If the former, sometimes an age difference can help. If the latter, age difference can get in the way.
Also, age difference depends on how old you are. At 18, four years is a significant difference. At 60, it is insignificant.
I've dated women a few years older than me and those 15 years younger than me. Both my marriages have been to women one year younger than me.
Well, some idiot made up the arbitrary formula of half the guy's age plus 7. So (31/2)+ 7 = 22.5. Sounds okay to me :) Actually, seems a bit young. But the formula has spoken. Maybe a few years older for a bit more experience and maturity. 23-28 would probably be ideal.
I don't date younger than my sister (3 years younger than me). I'll go a little more in the older direction though. Due to my bad experiences with TWO Libras born twelve days apart in October of 1972, I know that eleven years older is too much. So within three years of my age older or younger is probably best for me. Though it'd be so cool if I got to love someone who was born earlier in 1983 (I was born that November).