(younger age * 2) - 7 fails.
The formula for minimum age of a partner, in RPN to remove ALL ambiguity is:
Your_age 2 / 7 +
So, formula for maximum age would be:
Your_age 7 - 2 *
(Then again, the formula tends to be applied to older man, younger woman, exclusively.)
Still, there are situations in which it can produce creepy results (past 30, the spread gets quite wide), and the formula completely fails below 14, as, for a 13 year old, it says that the youngest you can date is 13.5, but the oldest you can date is 12 (then again, the formula could be saying, "don't date at all if you're under 14", which is probably quite sound advice). But, during high school years through the 20s, it generally works fairly well, at least in the original intent, and beyond that, it sets a fairly good absolute maximum line for social acceptability of older man, younger woman.