As a matter of fact, people of all ages crack UPSC from 21 years of age to 40 years of age, But as far as I have observed, the most common age when most people crack UPSC is from 23–27. Of course people aged below this age bracket or above this bracket also crack the exam but their number is less.
Most of successful candidates fall in 23–27 years of age bracket. Let’s observe age of toppers of UPSC CSE 2018:-
Kanishak Kataria, AIR 1, UPSC CSE 2018 ( age 26)
Akshat Jain, AIR 2, UPSC CSE 2018 ( age 23)
Junaid Ahmad, AIR 3, UPSC CSE 2018 ( Age 27)
Shreyansh Kumat, AIR 4, UPSC CSE 2018 ( Age 23–24)
Srushti Jayant Deshmukh, AIR 5, UPSC CSE 2018 ( Age 23)
Shubham Gupta, AIR 6, UPSC CSE 2018 ( Age 25)
Karnati Varun Reddy, AIR 7, UPSC CSE 2018 ( Age around 25–26)
Vaishali Singh, AIR 8, UPSC CSE 2018 ( Age 27)
Gunjan Dwivedi, AIR 9, UPSC CSE 2018 ( Age 24)
Tanmay Vashistha, AIR 10, UPSC CSE 2018 ( Age 26)
So, as we can see, all of the successful candidates in top 10 fall in the age bracket of 23–27. That why, as per my observation, most of the successful candidates fall in the age bracket of 23–27 ( except for few other who fall below or above this age bracket).