In Aiden route, when Cody goes to talk with the Headmaster(Aiden's stepfather) , Are 3 options: ask about the test, ask about aiden and ask about have "fun". I you choose ask about Aiden, they talk about him and Cody will say he had 20 and the headmaster confirm it
There's no way for Cody to know his age, he just guessed because he knows he's older. Then the headmaster purposely kept it vague because he doesn't care to actually answer Cody's questions.