It always takes longer than you expect, even when you take into account Hofstadter's Law.—Hofstadter's Law, from Gödel, Escher, Bach: An Eternal Golden Braid
A common cognitive bias resulting in predicting absurdly short timeframes for planned projects, famously observed with, among other projects, the Sydney Opera House, completed ten years late and a hundred million dollars overbudget.
Symptomatic of the Planning Fallacy is an assumption of a best-case scenario; people plan as if everything will go smoothly, as hoped for, with no unexpected delays. In practice, this is typically not the case, and delays quickly mount.
The bias also seems to be related to taking an "inside", detail-oriented view of the project to be planned; studies show that the more detailed a plan is, the more optimistically inaccurate it is likely to be.
When possible, take the outside view. Avoid estimating the time for a project by adding time estimates for sub-tasks; instead, look for previously completed projects of similar type and scale, and base the estimate on how long those other projects took.