"How long will this take?"
It is the question engineers are worst at answering, and the one we answer most often. Every sprint planning. Every quarterly roadmap. Every scoping conversation with a product manager who needs a number before lunch.
The reason we are bad at it is not a skill issue. Kahneman and Tversky documented the first of the three culprits in 1979, and the pattern has reproduced in every follow-up study since. Your brain is running a specific kind of distortion when it predicts time and cost. You can know the distortion is there, and still have your next estimate come out short.
Below are the three biases that account for most of the damage, with the mechanism for each and the countermeasure engineers can actually run. This is the estimation half of cognitive bias; code review has its own set and belongs in a separate post.
1. Planning fallacy: your past misses don't update your next guess
Planning fallacy, named by Kahneman and Tversky in 1979 and formalized in Buehler, Griffin, and Ross's 1994 paper, is the systematic tendency to underestimate the time and cost a task will take. The uncomfortable specific finding: the bias does not shrink as you accumulate past experiences of underestimation. You can miss your last ten sprint estimates and the eleventh will still feel accurate as you write it down.
The reason is in the shape of the mental model you use when estimating. You imagine the task going well. The design lands on the first attempt. The PR gets one round of review. CI passes. Nobody calls in sick. Each individual "things go well" assumption has a decent probability. The catch is that estimation requires all of them to hold at once, and the joint probability of 8 independent "90% likely" events is 43%, not 90%. Your brain does not multiply those correctly.
How this hits engineers specifically
Four patterns show up over and over in estimates that blow out:
- Only the "writing code" portion gets estimated. Design, test writing, PR back-and-forth, documentation, deployment all get folded into a mental "that's quick" bucket that turns out not to be.
- The first version is assumed to work. Debugging time is not line-itemed. If the function is "an afternoon," the debugging is implicitly zero.
- Dependent work is treated as instant. The API team's delivery date, the design review, the security sign-off are all assumed to arrive the day you ask for them.
- Context-switch cost is zero in the plan and real in the day. Two hours in the morning plus two hours in the afternoon is not four hours of coding. Meetings, Slack interrupts, and the 20 minutes to re-page in the problem eat half of it.
Countermeasure: reference-class forecasting
Kahneman's own recommendation for planning fallacy is reference-class forecasting. The move is to stop estimating from the inside (task-detail-first) and start estimating from the outside (prior-cases-first):
- List the last 6 months of tickets that resemble this one.
- Take the median actual time, not the mean. Medians are robust to the one disaster ticket that dragged the mean.
- Adjust the median by at most ±20% for task-specific factors. If you think it needs more, your reference class is probably wrong.
The pre-work this requires is logging both estimates and actuals. If your ticket tracker records only estimates, you have no reference class to pull from. Starting the log today is a small change with a 6-month lag before it pays off.
2. Optimism bias: "this one won't hit the usual problems"
Optimism bias is the broader cousin of planning fallacy. Kahneman's description: humans predict their own future outcomes as better than base rates suggest they will be. It applies to estimation, but it also applies to risk assessment, which is where it quietly causes more damage than the 3-week-becomes-6-week miss.
The engineer version shows up in sentences that feel reasonable when you're typing them:
- "This refactor doesn't touch the auth path, so it won't affect production."
- "The library upgrade is a minor version bump, no breaking changes."
- "Staging behaves the same as prod; we're fine."
Each one is a risk estimate dressed up as a factual claim. Optimism bias shifts the base rate you're implicitly using toward the outcome you prefer, and the shift happens before you notice you're estimating a probability at all.
The effect compounds. Once the premise "this probably won't go wrong" has entered the plan, downstream decisions follow from it. Rollback procedures get thinner. Testing budgets get cut. Buffer time gets reallocated to the next feature. The optimism is not in the one sentence; it's in every decision that sentence spawned.
Countermeasure: pre-mortem
Psychologist Gary Klein proposed the pre-mortem as a structural counter to optimism bias. The format inverts the usual retrospective:
- Before the project starts, assume it has already failed.
- As a team, spend 20 minutes listing the reasons it failed.
- Convert each reason into a prevention step with an owner.
The inversion matters. "List what could go wrong" runs into optimism bias immediately; your brain minimizes each risk as it surfaces. "We failed; why?" is a story-completion task, and your brain is excellent at story completion. The same risks come out, but they come out faster and with more specificity, because you're answering a different question.
A pre-mortem adds maybe 30 minutes to the start of a project. A missed risk adds weeks.
3. Anchoring: the first number in the room owns the conversation
Anchoring is the oldest of the three biases to be formalized (Tversky and Kahneman, 1974), and in estimation contexts it is the most visible. The claim is simple: once a number is in the conversation, everyone's subsequent estimate clusters around it, even when the anchor is clearly arbitrary.
In sprint planning, the anchor is usually the first estimate someone states out loud. "I think it's about 3 days." The engineer who would otherwise have said "a week" now says "5 days." The engineer who would have said "half a day" now says "2 days." The variance in the room collapses toward the anchor and the group feels converged on a number they're actually pulled toward.
There are three channels anchoring runs through in real teams:
- The PM or stakeholder's expectation. "Can we get this out in a month?" is an estimation question in form and an anchor in function. You start thinking about how to make the month work before you've checked whether a month is realistic.
- Prior-ticket precedent. "The similar feature last quarter took 2 weeks." The stack has changed, the team has changed, the requirements have changed, but the 2-week number stays glued to your current estimate.
- Story-point scale shape. Fibonacci-style pointing (1, 2, 3, 5, 8, 13) has deliberate gaps, and the gaps become their own anchors. When you're torn between a 5 and an 8, the ticket you pointed yesterday owns the tiebreaker.
Countermeasure: planning poker, run strictly
Planning poker's actual value is not that groups average to better numbers. It's that simultaneous reveal prevents anchoring. If everyone writes down their estimate before any number is spoken, the first person's answer cannot become the anchor.
Planning poker fails when teams get loose about the rule. "Just tell me your number, then we'll compare" collapses the whole point of the exercise. So does "let's hear from the lead engineer first." Both reintroduce the exact anchoring the format was designed to prevent.
If you run planning poker, run it with the reveal step intact. Otherwise you have the overhead of the ritual without the mechanism that makes the ritual worth doing.
The three biases compound in one meeting
In a real sprint planning, the three stack on top of each other inside two minutes:
- The PM opens with "we need this out in 2 weeks." → Anchoring sets the range.
- The engineer thinks "I can probably make 2 weeks work if things go well." → Optimism bias picks the best-case path.
- The engineer estimates based on the best-case path. → Planning fallacy ignores the probability of any of the fail paths firing.
The output is a 2-week number that was pre-decided by the PM's opener and rubber-stamped by the two downstream biases. The ticket ships in 4 weeks. Nobody in the room was lying; the room was running three distortions in sequence.
A rough heuristic that falls out of the planning-fallacy literature: if your gut says 2 weeks, plan for 4. This is not elegant. It is also closer to actual outcomes than the number your gut produced.
Estimation is unfinished work, not a prediction
The point of knowing these three biases is not to get your estimate right the first time. That is not a thing that is going to happen. The point is to know which direction your estimate is wrong, so you can budget around the error instead of being surprised by it.
An estimate you can't defend against anchoring, a plan you built without a pre-mortem, and a ticket you scoped without a reference class is a sprint commitment with three known holes in it. Filling the holes is cheap. Being surprised by them in week 3 is not.
This piece draws on the estimation chapter of a book on cognitive biases engineers should know. If you want the rest of the set (framing, availability, confirmation bias, and the review-specific biases) the full book is here: Cognitive Bias for Software Engineers.

