The answer is: mental age
The way we measure age is generally divided into two, Chronological and mental age.
Chronological age is measured by counting how much years have passed since our birth, mental age on the other hand is measured by the combination of our personality.
People in higher mental age tend to be really more responsible about their well being and would think about the consequences before taking any action ( Just like Hermione)