birth of Hagrid: Y-52
Hagrid expelled from Hogwarts: Y-38
Tom Riddle kills his father and grandparents: Y-36
James and Lily first attend Hogwarts: approximately Y-10
Harry Potter is born: July 31, Y0
Harry's parents are killed and Voldemort is defeated: October 31, Y1
Harry Potter's first trip to Hogwarts aboard the Hogwarts Express: September 1, Y11
Harry Potter first sees the Mirror of Erised: December, Y11
Harry Potter attends Nearly-Headless Nick's 500th Deathday Party: October 31, Y12
The Basilisk is defeated in the Chamber of Secrets: end of May, Y13
The Quidditch World Cup: August 25, Y14 (the Monday before September 1, which is also a Monday)
The rebirth of Voldemort: end of June, Y15
the Battle of the Department of Mysteries and the death of Sirius: June, Y16
There are numerous contradictions in the timeline, though it should be noted that Rowling herself has admitted having difficulty with managing mathematics in the FAQ section of her website, so perhaps perfect internal consistency is not to be expected.
Despite its problems, this timeline is extensively used by fans and Warner Bros.'s timeline of the series (featured on the DVDs for Harry Potter and the Chamber of Secrets and Harry Potter and the Prisoner of Azkaban) contains dates that were interpolated from this dating system (such as Harry's birthday being on July 31, 1980 and his first defeat of Lord Voldemort being on October 31, 1981.) For the sake of convenience, this dating system will be used by Wikipedia for all Harry Potter articles.
Problem with time
Often when dates are given, they are given with a day of the week that does not match with the date as it is in actual history. Just one such example occurs in Harry Potter and the Prisoner of Azkaban when Sybill Trelawney refers to October 16 as Friday, despite October 16, 1993 being a Saturday. This is usually explained on the grounds of it being simply poetic licence on the author's part. One must also keep in mind that Harry Potter is only fictional.
Spoiler warning: Plot and/or ending details follow.
There are also contradictions within the books themselves in this area. For example, in Harry Potter and the Goblet of Fire, both 1 September and 2 September are given as Mondays and, in Harry Potter and the Prisoner of Azkaban, Buckbeak's trial is set on 20 April, but careful parsing of the text reveals that it could have happened no later than February.
There are also instances during flashbacks or memories where things are said that don't make sense during that time period. An example of this may be in Horace Slughorn's unaltered memory in Harry Potter and the Half-Blood Prince, he says to Tom Riddle about Horcruxes "It's a banned subject at Hogwarts, you know... Dumbledore's particularly fierce about it..." During this time, Dumbledore was not headmaster and would have no authority over what subjects were banned at Hogwarts. The headmaster while Tom was a student at Hogwarts was Armando Dippet. On the other hand, perhaps Dumbledore put pressure on Dippet to ban it, as he was likely to have been one of the most influential professors. Or, it could have been banned before that time, and Dumbledore was simply a vocal supporter of it.
In Harry Potter and the Half-Blood Prince, Cornelius Fudge uses a male pronoun to refer to the "predecessor" of the Prime Minister of the United Kingdom. According to the above timeline, this should occur in the summer of 1996, when the Prime Minister was John Major, whose immediate predecessor was a female - Margaret Thatcher.
It is possible that Fudge could be referring to a more distant predecessor, but it's unlikely as Thatcher took office before Fudge supposedly became Minister of Magic. (Although one could imagine a scenario in which Fudge was delegated by the Minister of Magic to meet with the Prime Minister while he, Fudge, was in an inferior office.) Additionally, the personality and history of the Prime Minister portrayed appears to more closely match that of Tony Blair than of John Major. An article in the Daily Mail notes that Rowling is close to the Chancellor of the Exchequer Gordon Brown (often viewed as a rival to Blair's leadership of the Labour Party), and that she might have been attempting to show Blair's worst side. The rebuttal for this is that the books are fictional and the Prime Ministers themselves are fictional characters, and are not to be interpreted as the actual Prime ministers. Another, related problem is that Major is described as having been elected, although technically he could be said to have been elected Conservative Party leader on November 27, 1990.
A similar problem involves Nicolas Flamel. Flamel was mentioned as being 665 at the time of the first book, but Nicolas Flamel was a real historical figure and wouldn't have reached that age until 1996. The rebuttal for this is that the date the "real" Nicolas Flamel was born does not correspond with the Nicolas Flamel of Harry Potter.
There is at least one slight anachronism in the books. This occurs in a letter Harry writes in book 4, containing a reference to Dudley Dursley owning a PlayStation. According to the timeline, this would be in the summer of 1994, but the PlayStation was not released until December, 1994 in Japan and September, 1995 in Europe. The book was published in 2000, so this would likely be due to author error. Often the rebuttal is that Dudley is so spoiled his parents had preordered it from Japan for the son whom they so treasure. Of course, this would also mean that the games for it would all be in Japanese.
Timeline of the Harry Potter Series
Spoiler warning: Plot and/or ending details follow.
• 382 BC
Ollivander's goes into business making magic wands.
• c. 962 AD
Primitive broomsticks are first used for transport.
• c. 1000
Hogwarts is founded by Godric Gryffindor, Helga Hufflepuff, Rowena Ravenclaw and Salazar Slytherin. Slytherin petitions to only enroll pure-bloods and, in disgust, leaves the school, but not before building the Chamber of Secrets.
• c. 1294
The Triwizard Tournament is established. It will later be discontinued (date unknown) when the death toll mounts too high.
First Quidditch World Cup is played, during which all 700 Quidditch fouls are committed.
• c. 1891
Albus Dumbledore begins his first year of teaching at Hogwarts.
Newt Scamander is asked to write a compendium of magical beasts by Obscurus Books
• c. 1926
Shortly before his birth, Tom Riddle's Muggle father (Tom Riddle Sr.) leaves his wife (a witch named Merope Gaunt) and she dies a hour after giving birth to her son. Riddle is raised in an orphanage.
Fantastic Beasts and Where to Find Them is published in its first edition.
• c. 1938
Tom Riddle starts at Hogwarts.
• c. 1940
Rubeus Hagrid starts at Hogwarts.
Riddle opens the Chamber of Secrets, killing a girl who will later become Moaning Myrtle, and frames Rubeus Hagrid for the attacks.
Riddle murders his father and paternal grandparents and frames his uncle, Morfin Gaunt for the murders.
Dumbledore defeats the dark wizard Grindelwald.
Riddle graduates from Hogwarts.
Riddle asks Dippet to hire him as a teacher and is refused.
Riddle steals an artifact of [the Hogwarts Founder Salazar Slytherin[ and possibly an artifact of the[Hogwarts Founder Helga Hufflepuff]
• c. 1956
December - Minerva McGonagall begins at Hogwarts.
Riddle asks Dumbledore for the DADA position
Death Eaters already recruited Rosier, Nott, Mulciber, Dolohov
Riddle already calling himself Lord Voldemort
• c. 1970
Riddle becoming more powerful and begins his quest for power and immortality.
• c. 1971
James Potter, Lily Evans, Sirius Black, Remus Lupin, Peter Pettigrew and Severus Snape begin attending Hogwarts.
• c. 1979
Sybill Trelawney predicts Voldemort's downfall.
Hermione Granger is born on September 19
Sybill Trelawney is hired as the Divination teacher
Ron Weasley is born on March 1
Draco Malfoy is born on June 5
Neville Longbottom is born on July 30
Harry is born on July 31
Ginny Weasley is born on 11 August.
Regulus Black killed
Severus Snape hired as Potions teacher
Voldemort kills James and Lily Potter on October 31 but is later defeated by Harry. Harry is left with a lightning-shaped scar and is sent to live with the Dursleys. On November 1, Sirius Black is arrested for the murder of Peter Pettigrew, who then goes into hiding.
Harry Potter, Ron Weasley and Hermione Granger start at Hogwarts on September 1.
Harry foils Voldemort's plans to steal the Philosopher's Stone. Ginny Weasley opens the Chamber of Secrets under the influence of Tom Riddle's diary.
Harry saves Ginny and defeats the memory of Tom Riddle, unwittingly destroying Voldemort's first Horcrux in the process. Sirius Black escapes from Azkaban.
Professor Trelawney makes her second prediction. Harry learns of Sirius' true colours and Peter Pettigrew escapes on June 6. Voldemort murders Frank Bryce. The Triwizard Tournament is held for the first time in over a century.
With the aid of Pettigrew, Voldemort is restored to full power. Voldemort murders Cedric Diggory on June 24. The Order of the Phoenix is reestablished by Albus Dumbledore.
Voldemort fails to recover the Prophecy from the Department of Mysteries, due to the efforts of Harry and company. Harry learns of Professor Trelawney's first prediction and the wizarding world is finally alerted to Voldemort's return. Sirius Black is killed in the Department of Mysteries.
Harry, Ron, and Hermione start at their sixth year at Hogwarts. Draco Malfoy sneaks off to Knockturn Alley to go to Borgin and Burkes to buy a cursed necklace to poison Albus Dumbledore, but it gets to Katie Bell instead.
Albus Dumbledore destroys another of Voldemort's Horcruxes, formerly encased in Marvolo Gaunt's ring. Albus Dumbledore is killed by Severus Snape. Harry Potter decides upon his quest to destroy the remaining four Horcruxes in which Lord Voldemort has sealed fragments of his soul.
• c. 1840 or 1841
• c. 1908
Merope Gaunt to Marvolo Gaunt and an unnamed witch.
October 4 - Minerva McGonagall
December 31 - Tom Marvolo Riddle (Lord Voldemort) to muggle Tom Riddle, Sr. and witch Merope Gaunt
• c. 1928
December 6 - Rubeus Hagrid to the giantess Fridwulfa and an unknown wizard
April 13 - Moaning Myrtle
October 30 - Molly Prewett
• c. 1954
Lucius Malfoy to Abraxas Malfoy and an unnamed witch
January 9 - Severus Snape
March 10 - Remus Lupin
c. - Lily Evans
c. - Sirius Black
c. - Peter Pettigrew
c. - James Potter
November 29 - Bill Weasley to Arthur and Molly Weasley
December 12 - Charlie Weasley to Arthur and Molly Weasley
c. - Nymphadora Tonks
• c. 1975
February 21 - Cedric Diggory to Amos Diggory and his wife
August 22 - Percy Weasley to Arthur and Molly Weasley
c. - Viktor Krum
c. - Fleur Delacour to an unknown wizard and a half-Veela
April 1 - Fred and George Weasley to Arthur and Molly Weasley
September 19 - Hermione Jane Granger to Mr. and Mrs. Granger, Muggle dentists
c. - Cho Chang
March 1 - Ronald Bilius Weasley to Arthur and Molly Weasley
June 5 - Draco Malfoy to Lucius and Narcissa Malfoy
July 30 - Neville Longbottom to Frank and Alice Longbottom
July 31 - Harry James Potter to James and Lily Potter
August 11 - Ginny Weasley to Arthur and Molly Weasley
c. - Colin Creevey
c. - Luna Lovegood to the editor of The Quibbler and his wife
• c. 1982
• c. 1983
• c. 1984
Gabrielle Delacour to an unknown wizard and a half-Veela
October 31 - Nearly Headless Nick, by being partially beheaded
December 31 - Merope Gaunt
June 13 - Myrtle (surname unknown), a female Hogwarts student, who will become known as Moaning Myrtle, by the basilisk from the Chamber of Secrets under the influence of Tom Riddle
Regulus Black, according to his brother Sirius murdered by Death Eaters, because he wanted to leave them. (Never confirmed, so this is, at present, pure speculation on the part of Sirius.)
October 31 - James and Lily Potter, from an attack by Lord Voldemort
• c. 1990
Luna Lovegood's mother, in an accident
June - Professor Quirrell, died (in agony from the protection left in Harry Potter from his mother; possibly not... the book only says that "Quirrell was left to die", not "Quirrell died". It should be noted that the movie interprets this as meaning he died, as his death is indeed shown on-screen).
Summer - Bertha Jorkins, murdered by Voldemort after he extracted information on the approaching Triwizard Tournament from her.
August - Frank Bryce, murdered by Voldemort for overhearing Voldemort and Pettigrew's plot to kill Harry Potter.
May - Barty Crouch, by his son posing as Mad-Eye Moody after his attempt to inform Dumbledore of his son's escape.
June 24 - Cedric Diggory, murdered by Peter Pettigrew on Voldemort's orders
June - Sirius Black, from falling through the veil in the Death Chamber in the Department of Mysteries.
Summer - Amelia Bones, murdered in the first days of the Second War, probably by Lord Voldemort himself.
Summer - Emmeline Vance, murdered by Death Eaters in the first days of the war, on information from Snape, in the vicinity of 10 Downing Street.
Summer - Igor Karkaroff murdered by Death Eaters because he betrayed them
Hannah Abbott's mother
Spring - Aragog, passes on due to old age after Hagrid makes a valiant attempt to preserve his life.
June - Gibbon, a Death Eater, hit accidentally with an Avada Kedavra curse by one of his own allies, in the corridor leading up to the astronomy tower.
June - Dumbledore, killed by Snape's Avada Kedavra curse on top of the astronomy tower after being previously weakened.