Les Mis character ages as of June 1832:
[ Hugo was not fond of math or exact ages :) This is just an approximation of how old the characters could have been. I'd say any of these could be at least one year younger or older, depending on exact birthdays or whether their age was rounded up or down. Quotes are from Hapgood translation on Gutenberg. ]
Valjean: 63 ("I am forty-six" - 1.2.3, October 1815; born ~1769)
Javert: 52 ("aged fifty-two" - 4.12.7; born ~1780)
Marius: 21 ("one and twenty years of age" - 4.8.7)
[ note: Cosette, Eponine and Azelma are particularly iffy, check out this post for details ]
Cosette: 16-17 ("two or three years of age", “She is going on three.” - 1.4.1 (spring 1818); "she was nearly eight years old" - 2.3.8 (December 24th, 1823), "fifteen years" - 3.6.2 (1831) )
Eponine: 16-17 ("two little girls; one about two years and a half old, the other, eighteen months" - 1.4.1 (spring 1818), "I had not reached years of discretion. I lack two months of it." - 4.2.4 (early 1832))
Azelma: 14-16 (as above - about a year younger than her sister; "she really was fourteen" though the narrative then talks about a fifteen year old - 3.8.6 (February 3rd, 1832) )
Gavroche: 11-12 ("a little boy eleven or twelve years of age" - 3.1.13)
The younger Thenardier boys: 7 and 5 ("one apparently about seven years of age, the other five" - 4.6.2 (spring 1832) )
Thenardier: 59 ("Thénardier had just passed his fiftieth birthday" - 2.3.2 (late? 1823) )
Mme Thenardier: late 40s at the time of death ("Madame Thénardier was approaching her forties" - 2.3.2 (late? 1823), "A big woman, who might be forty years of age" - 3.8.6 (February 3rd, 1832))
Courfeyrac: 25 ("l'émeutier de vingt-cinq" - 5.12.5 (Hapgood doesn't translate the number) )
Enjolras: 26 ("His two and twenty years appeared to be but seventeen" - 3.4.1 (late 1828) )
Bousset: 29 ("At five and twenty he was bald" - 3.4.1 (late 1828) )
Grantaire: 29 ("I am of the same age as that baldy" - 4.12.2)
Joly: 27 ("At three and twenty he thought himself a valetudinarian" - 3.4.1 (late 1828) )
Bahorel: at least late 20s, possibly 30s ("Bahorel had figured in the bloody tumult of June, 1822", "a student in his eleventh year" - 3.4.1 (late 1828) )
[ I have assumed that the ages given in 3.4.1 are their ages in 1828, but some argue that these are their ages in 1832. The rest of Les Amis are unknown, likely 20-30 ]
Montparnasse: 18-19 ("Montparnasse was a child; less than twenty years of age"; "At eighteen, he had already numerous corpses in his past." - 3.7.3, "ruffian eighteen years of age", "How old are you? Nineteen." - 4.4.2)
Gueulemer: likely late 30s ("having been a porter at Avignon in 1815", "less than forty years of age" - 3.7.3)
Babet: likely at least late 20s, possibly older ("He had been married and had had children." - 3.7.3)
Brujon: unknown, likely early 20s ("The Brujon of 1811 was the father of the Brujon of 1832."; "young spark" - 4.2.2)
Claquesous: no information at all :(
Mabeuf: ~80 ("M. Mabeuf was nearly eighty years of age" - 4.2.3 (spring 1832) )
M. Gillenormand: 91 ("old man of ninety-one" - 4.8.7
Aunt Gillenormand: 57 ("seven and fifty years of age" - 5.5.4)
Touissant, Nicolette: "elderly" ("Toussaint could not get on with Nicolette, the soldering of two elderly maids being impossible" - 5.8.2)
Basque: 55+ ("fellow of fifty-five" - 3.2.5, possibly the age he was hired at?)