The overall effect of an exposure on an outcome, in the presence of a mediator with which the exposure may interact, can be decomposed into 4 components: (1) the effect of the exposure in the absence of the mediator, (2) the interactive effect when the mediator is left to what it would be in the absence of exposure, (3) a mediated interaction, and (4) a pure mediated effect. These 4 components, respectively, correspond to the portion of the effect that is due to neither mediation nor interaction, to just interaction (but not mediation), to both mediation and interaction, and to just mediation (but not interaction). This 4-way decomposition unites methods that attribute effects to interactions and methods that assess mediation. Certain combinations of these 4 components correspond to measures for mediation, whereas other combinations correspond to measures of interaction previously proposed in the literature. Prior decompositions in the literature are in essence special cases of this 4-way decomposition. The 4-way decomposition can be carried out using standard statistical models, and software is provided to estimate each of the 4 components. The 4-way decomposition provides maximum insight into how much of an effect is mediated, how much is due to interaction, how much is due to both mediation and interaction together, and how much is due to neither.