People readily imagine counterfactual alternatives to reality when they think ‘if only…’. They create counterfactuals to explain the past and also to prepare for the future. Their counterfactual imagination influences their emotional experiences, e.g., of regret, and their moral judgments, e.g., of blame. I discuss how people create counterfactual alternatives to reality, reviewing evidence from behavioral studies of decision-making and moral judgment. I also discuss how people reason from counterfactual conditionals, reviewing evidence from comprehension and inference studies. I consider competing views about the nature of the mental representations and cognitive processes that underlie counterfactual thinking, such as that it depends on the construction of possibilities, or on the computation of probabilities.