This paper introduces a new method for decomposing group differences in the mean of a variable into various within-group and between-group components with respect to group categories of intermediary variables. This is accomplished by considering counterfactual outcomes that would be realized by social interventions that change the relationship among variables. Because such a change does not by itself determine the counterfactual outcome, the paper introduces and juxtaposes two different mechanisms—the mechanism of realizing the counterfactual state that deviates least from the existing state, and the mechanism of holding relations among variables other than those that are modified by a given intervention unchanged—and demonstrates that despite the large difference in the mechanisms, they yield highly congruent outcomes. As an illustrative example, the paper analyzes gender inequality in hourly wages in Japan and thereby demonstrates the usefulness of the new method for deriving policy implications.