What Is Counterfactual Thinking? The Science of “What If”

Counterfactual thinking is the mental process of imagining alternatives to events that already happened. It’s the “what if” or “if only” voice in your head: what if I had taken that other job, what if I hadn’t said that, what if I’d left five minutes earlier. Nearly everyone does it, and it serves a real psychological purpose, though it can also become a source of lasting regret and emotional pain when it gets stuck on repeat.

How Counterfactual Thinking Works

Counterfactual thoughts follow an “if-then” structure. The “if” part imagines a different action (“if only I had studied harder”), and the “then” part imagines a different outcome (“then I would have passed the exam”). Your brain is essentially running a simulation of a past event with one variable changed, then projecting what might have resulted.

Psychologists divide these thoughts into two categories. Upward counterfactuals imagine a better alternative to what actually happened: “If I had left earlier, I wouldn’t have been late.” Downward counterfactuals imagine a worse alternative: “At least I wasn’t in the accident that happened an hour later.” The direction matters because each type produces a different emotional and motivational effect.

Upward vs. Downward: Different Emotions, Different Functions

Upward counterfactuals tend to make you feel worse in the moment. You’re comparing reality to something better, so the gap between what happened and what could have happened stings. But this discomfort often motivates change. By mentally identifying what went wrong, you create a kind of blueprint for doing better next time. A student who thinks “if I had started studying a week earlier” is, in effect, generating a plan for the next exam.

Downward counterfactuals work the opposite way. Imagining how things could have gone worse makes you feel grateful or relieved about the actual outcome. This can be a healthy emotional regulation strategy, helping you cope with a bad situation by recognizing it wasn’t the worst possible version. The tradeoff is that downward counterfactuals don’t push you toward improvement the way upward ones do.

Why Your Brain Does This

Counterfactual thinking isn’t a flaw or a bad habit. It’s a core part of how humans learn from experience. By mentally replaying events with different choices, you extract causal information: you figure out which of your actions actually influenced the outcome. This is the basis of the functional theory of counterfactual thinking, which holds that these “what if” simulations evolved because they help people avoid repeating mistakes and prepare for similar situations in the future.

The process is closely related to another form of mental simulation called prefactual thinking, which is forward-looking rather than backward-looking. Where a counterfactual says “if only I had trained harder,” a prefactual says “if I train harder next time.” Research comparing the two found that prefactual thoughts tend to focus more on controllable elements like concentration and strategy, while counterfactual thoughts more often fixate on things beyond immediate control, like personality traits or situational factors. Interestingly, both types of thinking improved task performance equally well in experiments, suggesting that the act of mentally simulating alternatives, whether past or future, primes your brain to do better.

When It Becomes Harmful

The trouble starts when counterfactual thinking turns repetitive and self-focused. Instead of generating a useful lesson and moving on, some people get caught in a loop: imagining the better outcome, feeling regret, then imagining it again. This pattern closely resembles rumination, the repetitive negative thinking that is a hallmark of depression.

A model proposed in depression research identifies two specific ways this loop causes damage. First, repeatedly comparing an actual outcome to a superior imagined alternative gradually drains the subjective value of what you actually have. Your real life starts to feel worse not because anything changed, but because you keep measuring it against a fantasy. Second, for people with fragile self-esteem, each round of “I should have chosen differently” inflicts fresh damage to their sense of self-worth. The thought isn’t just “that outcome was bad” but “I am the kind of person who makes bad choices.”

These two processes can feed each other. The negative emotions created by counterfactual thinking trigger more counterfactual thinking, which creates more negative emotions. Researchers describe this as a vicious circle, and it helps explain why some people can spend years replaying a single decision. The emotional experience at the center of this loop is regret, which is distinct from disappointment. Disappointment is about bad outcomes in general. Regret is specifically about outcomes you believe your own choices caused.

When Children Develop This Ability

Counterfactual reasoning isn’t something children are born with. It develops gradually between the ages of 6 and 12, with significant variability from child to child. Younger children can handle simple hypothetical scenarios, but the more complex forms of counterfactual reasoning, where you have to override what actually happened and reason purely from an imagined alternative, don’t fully mature until around age 12.

In one study, children between 9 and 11 answered only 39% of questions correctly when the task required true counterfactual reasoning rather than just recalling what happened. Children aged 12 to 14 answered all of those same questions correctly, performing at adult levels. This suggests that the cognitive machinery required for counterfactual thought, including the ability to hold two conflicting versions of reality in mind simultaneously, is one of the later-developing reasoning skills in childhood.

Practical Uses Beyond Everyday Regret

Because counterfactual thinking is essentially a mental rehearsal tool, professionals in high-stakes fields use it deliberately. In aviation psychology, pilots are encouraged to use a structured version of counterfactual reflection as a training technique. The process involves taking a flight event that was handled poorly, identifying what should have been done differently, imagining the better result, and then mentally rehearsing the improved response repeatedly. This technique, sometimes called “embedding,” draws on the same principle used in sports psychology: mental rehearsal of the correct action can improve future performance in ways similar to physical practice.

The same logic applies in less dramatic settings. Athletes reviewing game tape are engaging in counterfactual thinking. So is a manager replaying a conversation that went sideways, or a student rethinking their approach to a problem set. The key difference between productive and destructive counterfactual thinking is whether the thought generates a concrete, actionable change or simply loops back into self-blame. When you catch yourself in a “what if” spiral, the most useful move is to convert the counterfactual into a prefactual: shift from “if only I had done X” to “next time, I will do X.” Research suggests this pivot toward controllable, future-focused thinking preserves the learning benefit while reducing the emotional cost.