I've always wonder about the number of Hogwarts students and particularly the number of students in Harry's year.

JKR showed this list in "Harry Potter and me".

Screenshot of JKR's notebook concerning the students in Harry's year

The list countains 40 names, 5 per gender per house.

However, on Pottermore, it is said that JKR just tought to 40 students, but there were more than 40 students per year... but JKR's statement doesn't fit with the story.

The Gryffindor boys are definitely five (Harry Potter, Ronald Weasley, Neville Longbottom, Dean Thomas and Seamus Finnigan), while the known Gryffindor girls are three (Hermione Granger, Calì Patil and Lavanda Brown). It can be assumed that the Gryffindor students were ten, the known Gryffindor students + "two missing girls". This is proved true, because in Lupin's lesson with the boggard, Lupin wants all the students to have a go:

  • Neville
  • Calì
  • Seamus
  • Unidentified girl
  • Unidentified girl
  • Unidentified girl
  • Dean
  • Ron

Harry and Hermione don't have to work with it.

One of the unidentified girls is Lavanda. The other three are the two missing Gryffindor.

NB: Many people think this two girls may be Fay Dunbar and her friend, but THESE TWO GIRLS ARE NOT CANON!! The first says she got a OWL in potion, while in HBP, Harry, Ron and Hermione are the only Gryffindor students to frequent Potion lessons. The second said she left Arithmancy, because was difficult, but didn't Hermione state she was the only Gryffindor student in Arythmancy class?

Now we know there are 10 Gryffindor students. The joint Gryffindor/Slytherin Potions and broom-riding classes in Harry's year add up to twenty students, thus there are ten Slytherins. Then the joint Gryffindor/Hufflepuff class in Harry's year adds up to about twenty students, thus there are ten Hufflepuffs. I think that JKR goes with the idea that there are around 50-150 students per year, but she wouldn't have managed to "administrate" so many students and thus she (unintentionally) implied there are ten Gryffindors, ten Slytherins and ten Hufflepuff. It can be assumed there are ten Ravenclaws, though we have no evidence/proofs.

However, there is a problem: we are not told which other house or houses Gryffindor are paired with for fifth-year Defence Against the Dark Arts, but there appear to be thirty-one students in the class. It is possible the class contains all the houses and nine students left Hogwarts before the fifth year or maybe they were just sick. It is rather unlikely (but not impossible) that nine students were sick the same day. So I'm going with the first option.

Pottermore provides a list of the 39 students (there were actually 40 students, but a girl whose surname is Runcorn is missing):

  • Abbott, Hannah
  • Bones, Susan
  • Boot, Trevor
  • Brocklehurst, Mandy
  • Brown, Lavander
  • Bulstrode, Millicent
  • Corner, Michael
  • Cornfoot, Stephen
  • Crabbe, Vincent
  • Davis, Tracey
  • Entwhistle, Kevin
  • Finch-Fletchley, Justin
  • Finnigan, Seamus
  • Goldstein, Anthony
  • Goyle, Grgory
  • Granger, Hermione - inserted in pencil, see crossed-out entry, below
  • Greengrass, Queenie
  • Hopkins, Wayne
  • Jones, Megan
  • Li, Sue
  • Longbottom, Neville - inserted in ink, see crossed out entry, below
  • MacDougal, Isobel [original name Katrina crossed out]
  • Macmillan, Ernest
  • Malfoy, Draco - inserted in ink, see crossed-out entry, below
  • Malone, Roger
  • Moon, Lily [first intimation of Luna Lovegood, this name was never used, but gave me an idea for a fey, dreamy girl. She was named before I decided on Harry's mother's name.]
  • Nott, Theodore
  • Parkinson, Pansy
  • Patel, Madhari
  • Patel, Mati
  • Perks, Sally-Anne
  • Potter, Harry
  • [Puckle, Hermione - crossed out, name changed and reinserted, above]
  • [Puff, Neville - crossed out, name changed and reinserted, above]
  • [Quirrel, crossed out, subsequently used for teacher]
  • Rivers, Oliver
  • Roper, Sophie
  • [Sidebottom, Neville crossed out]
  • Smith, Sally [Georgina crossed out]
  • [Spungen, changed to Spinks, Draco, all crossed out, re-inserted above]
  • Thomas, Gary
  • Turpin, Lisa
  • Weasley, Ronald
  • Zabini, Blaise

So we know all the names and surnames of the original fourty students. I think everybody knows there are at least 8 Gryffindors (Harry Potter, Ronald Weasley, Hermione Granger, Neville Longbottom, Dean Thomas, Seamus Finnigan, Parvati Patil and Lavender Brwon), 4 Hufflepuffs (Ernest McMillan, Hannah Abbott, Justin Finch-Flitchley and Hannah Abbott), 6 Ravenclaws (Padma Patil, Terry Boot, Michael Corner, Anthony Goldstein, Mandy Brocklehurst and Lisa Turpin) and 8 Slytherins (Draco Malfoy, Vincent Crabbe, Gregory Goyle, Pansy Parkinson, Millicent Bulstrode, Blaise Zabini, Theodore Nott and Daphne Greengrass). However according Harry Potter and Me list, Anthony and Michael are Hufflepuffs; the list also provide us four Ravenclaws (Stephen Cornfoot, Kevin Enthwistle, Su Li and Morag MacDougal [the last student is citated in the book, but her house was not revealed]), 2 Hufflepuffs (Megan Jones and Wayne Hopkins) and 1 Slytherin (Tracey Davis). The remaining male students (Oliver Rivers and Roger Malone) must be Ravenclaws, because we have all the males from the other houses. Since Anthony and Michael were moved to Ravenclaw, two of the original Ravenclaws (Stephen, Kevin, Roger and Oliver) are now Hufflepuffs. Because Oliver's original surname was Quirrel, it is likely he was not moved to Hufflepuff and in the video games there was an Hufflepuff girl whose surname was Entwhistle. Thus I assumed that Kevin and Roger were Hufflepuffs, while Stephen and Oliver were Ravenclaws. At the end there are the remaining female students (Lily Moon, Sally-Anne Perks, Sophie Roper, ? Runcorn and Sally Smith) are two Gryffindors, two Hufflepuffs and one Slytherin. Lily Moon. She do appears in the first book, but just her surname is citated and her house is not revealed. She can't be a Ravenclaw. She is unlikely a Gryffindor, because Gryffindor seems an unsuitable house for a "Luna Lovegood's prototype" and Lexicon stated she is not in Harry's house. And she is unlikely to be in Slytherin, because in the sorting ceremony she is preceded by Malfoy and followed by Nott and Parkinson... I don't think JKR would have inserted four Slytherins consecutively. I think Lily Moon is a Hufflepuff. The other Hufflepuff should be Sally Smith (who is probably Zacharias's older sister or cousin). I don't think Sally-Anne Perks is a Slytherin, because "Perks" is very similar to "Parkinson". The other Gryffindor girl is probably Sophie Roper, because JKR stated she did decided to give a name to both the Gryffindor girls. Therefore Runcorn is a Slytherin.

Before the fifth year, some students presumably left Hogwarts:

  • Two Gryffindor girls (Sally-Anne Perks and Sophie Roper): all the Gryffindors in Harry's year were members of DA. It would be very strange they were the only who didn't join (unless they didn't believe in Harry's wards, but this should have been citated).
  • Sally-Anne Perks: she probably went away, also because of another reason. Sally-Anne is presumed to be between Parvati and Harry in alphabetic order, but in Harry's OWLs, Harry was preceded by Parvati.
  • Lily Moon: I think she left Hogwarts before the fifth year, because as I said before "she was Luna Lovegoode's prototype".
  • Li Su: Same thing. She was probably "Cho Chang's prototype", thus she left Hogwarts before the third year.
  • Mandy Brocklehurst, Morag MacDougal and Lisa Turpin: I know what you think ("You are crazy, how is it possible all the Ravenclaw girls left Hogwarts?). Yes, I agree with you. Hoever it is strange that Harry noticed the three girls at the sorting ceremony and then were never citated. This could indicate that AT LEAST two of the three girls left Hogwarts, but I'm going to think that all the girls went away.

Seven (or six) students left Hogwarts. This partially explains why there were thirty-one students at Umbridge's lesson. I assumed the other missing students were sick (if they left Hogwarts, they would be male students, because the others were all females).

Note: Canon is very confusing, I hope you understand and enjoy my work. :)