I am not a parent, so take my opinion with that appropriate amount of salt, but I’ll tend to agree with about 22 as the realistic maximum. It’s not because of the age itself, but what stage they are in their life.
If one is 18 and in high school or just starting college and the other is in college or just starting to work, they’re at the outter bounds of having that in common. So if you get much older than 22, they’ve now been out of college for a year or two and working and been a full responsible adult whereas the 18yo will still be several years away from that. Even if they’re both reasonable people, it’ll be a huge problem for them to relate as equals and it will put a lot of strain on the relationship. It might be able to push a little longer if the 18yo isn’t going into college but still has some kind of reasonable job skills to start a career rather than just having a job, but that’s pretty rare.
Another scenario would be if the older one didn’t go to college. If they’re 22, it’s not all that unreasonable that they might still be doing jobs rather than settling into a career or may be in the beginning stages of a career, so they can still have some stuff in common. But if they’re 23 or 24 and didn’t go to college, they’ve now basically spent 5 or 6 years in high school not really doing anything to further their lives. Especially if the 18yo is going into college, they’ll end up having difficulty relating as equals, but the pressure might be reversed where the older one is less responsible and a negative influence.
And really, it’s easy to think that one’s kid might be more mature and thus only relate well with people a little older, but if you look at it from the other end, what draws someone to want to date much younger people? Often times when I’ve seen large age discrepancies, the older person isn’t looking for someone who they’re really compatible with and they just stumbled onto someone who is younger, they’re actively looking for someone who is less and manipulable. So sure, your 18yo may really be as mature, intelligent and worldly as an average 25yo, but would someone like that really do well with an average 25yo? In a few years, they’ll either have surpassed them and be unhappy, or have possibly been held back in their development.
I think, if college is involved, once you get past that, age really doesn’t mean very much anymore, or without it a little younger, but 22 seems like the maximum reasonable age for an 18yo to date in pretty much any but the rarest circumstances.