We explore the prospects of a monist account of explanation for both non-causal explanations in science and pure mathematics. Our starting point is the counterfactual theory of explanation (CTE) for explanations in science, as advocated in the recent literature on explanation. We argue that, despite the obvious differences between mathematical and scientific explanation, the CTE can be extended to cover both non-causal explanations in science and mathematical explanations. In particular, a successful application of the CTE to mathematical explanations requires us to rely on counterpossibles. We conclude that the CTE is a promising candidate for a monist account of explanation in both science and mathematics