Hofstadter’s law is the observation that “It always takes longer than you expect, even when you take into account Hofstadter's Law.” In other words, time estimates for how long anything will take to accomplish always fall short of the actual time required -- even when the time allotment is increased to compensate for the human tendency to underestimate it. The non-specificity of the reference (it) reflects that the law is broadly applicable in any situation where the task is complex. Hofstadter’s law is frequently evoked in IT contexts and is particularly relevant to time management, productivity, project management and software development.
Douglas Hofstadter, a cognitive scientist and author, introduced the law in his 1979 book Gödel, Escher, Bach: An Eternal Golden Braid. The system under discussion was chess-playing computers, which had been predicted to beat humans within 10 years. However, ten years after that prediction, humans were still winning. Hoftstadter wrote that the inablility for machines to triumph by that time was "just one more piece of evidence for the rather recursive Hofstadter's Law." (In fact, it wasn’t until 1996 that IBM’s Deep Blue computer beat the reigning world champion Garry Kasparov.)
Hofstadter’s law illustrates one element of optimism bias, which leads people to overestimate the benefits of some proposed system and underestimate the drawbacks, as well as the time required for completion. It’s also closely related to the ninety-ninety rule proposed by Tom Cargill of Bell Labs: The first 90 percent of the code accounts for the first 90 percent of the development time. The remaining 10 percent of the code accounts for the other 90 percent of the development time.
See a presentation on why everything takes longer than you think it will: