PqPerquiraStart free
Methods Library/Design your study
Methods guide · Psychology · Psychiatry

Moderator vs mediator: the difference, with examples

A moderator tells you when or for whom an effect happens. A mediator tells you how it happens. Mixing them up is one of the most common errors in student theses.

10 min read9 referencesUpdated 30 November 2026

In short

  • Moderator: changes the strength or direction of an effect. "Does the therapy work better for some people?" (Baron & Kenny, 1986)
  • Mediator: carries the effect from cause to outcome. "Does the therapy work by changing how people think?" (Baron & Kenny, 1986)
  • Test moderation with an interaction; test mediation with the indirect effect and a bootstrap confidence interval (Preacher & Hayes, 2008).
  • Mediation is a causal claim about a process over time. Cross-sectional data cannot establish it (Maxwell & Cole, 2007).
On this page 1. The difference 2. Examples 3. In clinical trials 4. Testing moderation 5. Testing mediation 6. The problem with cross-sectional mediation 7. Common mistakes 8. Where Perquira helps

1. The difference

Baron and Kenny's paper is the classic statement of the distinction. A moderator is a variable that affects the direction or strength of the relation between a predictor and an outcome. A mediator is a variable that accounts for the relation: the predictor influences the mediator, which in turn influences the outcome (Baron & Kenny, 1986).

ModeratorMediator
Question it answersWhen? For whom? Under what conditions?How? Why? Through what process?
In wordsX → Y, and the arrow is stronger or weaker depending on MX → M → Y
Usually isA characteristic present before X (age, gender, baseline severity)Something X changes (a thought, a skill, a feeling)
Statistical testInteraction (X × M)Indirect effect (a × b)
Kind of research gapA "when" gapA "how" gap

2. Examples

Moderator: Physical exercise reduces depressive symptoms, and the effect is larger in people with more severe symptoms at the start. Baseline severity is a moderator.

Mediator: Cognitive therapy reduces depressive symptoms by reducing negative automatic thoughts. Change in negative thoughts is a proposed mediator.

Both: Parental warmth predicts adolescent self-esteem through lower rumination (mediation), and this indirect path is stronger in girls than in boys (moderated mediation).

These are illustrations of the structure of each claim, not summaries of specific studies.

3. In clinical trials

Kraemer and colleagues give a precise version for randomised trials. A moderator is measured at baseline, before randomisation, so it cannot be affected by treatment, and it identifies who responds differently. A mediator is measured during treatment, is affected by treatment, and helps explain how the treatment produces its effect (Kraemer et al., 2002). This timing rule is useful in any design: if your "moderator" could be changed by the predictor, it is probably not a moderator.

Kazdin adds a further distinction: a statistical mediator is not yet a mechanism. Showing a mechanism of change requires more, including evidence of timing, a dose-response relation, and consistency across studies, and he concluded that few mechanisms of psychotherapy had been firmly established (Kazdin, 2007).

4. Testing moderation

Moderation is tested with an interaction term in a regression or ANOVA: the product of the predictor and the moderator. If the interaction is significant, examine it with simple slopes (the effect of X at low, average and high values of M) or by plotting it. Hayes's text covers the methods in detail, and his PROCESS tool for SPSS, SAS and R implements them (Hayes, 2022).

Two practical points: interactions need much larger samples than main effects to detect, and a non-significant interaction in a small study is weak evidence that no moderation exists.

5. Testing mediation

Baron and Kenny's original "causal steps" approach tested a series of separate conditions (Baron & Kenny, 1986). Later work changed recommended practice in three ways:

  • Test the indirect effect directly. Preacher and Hayes recommend estimating the indirect effect (the product of the X → M path and the M → Y path) with a bootstrap confidence interval (Preacher & Hayes, 2008).
  • A significant total effect is not required. Zhao and colleagues and Rucker and colleagues both argue that mediation can exist even when the overall X → Y effect is not significant (Zhao et al., 2010; Rucker et al., 2011).
  • Plan the sample size. Fritz and MacKinnon showed that the causal steps approach has low power, and give the sample sizes needed to detect mediated effects with different methods (Fritz & MacKinnon, 2007).

6. The problem with cross-sectional mediation

Mediation describes a process in time: X changes M, which then changes Y. When all three are measured at once, that order cannot be observed. Maxwell and Cole showed that cross-sectional analyses can give seriously biased estimates of longitudinal mediation, even suggesting mediation where none exists (Maxwell & Cole, 2007).

If you can, measure X, M and Y at different time points, or manipulate X in an experiment. If you cannot, describe your result as "consistent with" mediation, and name the cross-sectional design as a limitation.

7. Common mistakes

  • Calling a moderator a mediator, or the reverse. Ask: does X change it (mediator), or does it change the X → Y relation (moderator)?
  • Using gender or age as a "mediator". Fixed characteristics that X cannot change are candidate moderators, not mediators (Kraemer et al., 2002).
  • Claiming a mechanism from one cross-sectional study (Maxwell & Cole, 2007; Kazdin, 2007).
  • Relying only on the causal steps instead of testing the indirect effect (Preacher & Hayes, 2008).
  • Underpowered interaction tests, then concluding "the effect is the same for everyone".

8. Where Perquira helps

  • Perquira separates studies that tested your main effect from studies that tested moderators or mediators of it, so they are not confused in your review.
  • It identifies "when" (moderator) and "how" (mediator) gaps: effects that are established but whose conditions or mechanisms have not been tested.
See a real example first. A complete Research Opportunity, produced from three keywords and not edited.
Read the example Try your own question

References

Every source cited on this page. Links go to the original publication.

  1. Baron, R. M., & Kenny, D. A. (1986). The moderator–mediator variable distinction in social psychological research: Conceptual, strategic, and statistical considerations. Journal of Personality and Social Psychology, 51(6), 1173–1182. https://doi.org/10.1037/0022-3514.51.6.1173
  2. Kraemer, H. C., Wilson, G. T., Fairburn, C. G., & Agras, W. S. (2002). Mediators and moderators of treatment effects in randomized clinical trials. Archives of General Psychiatry, 59(10), 877–883. https://doi.org/10.1001/archpsyc.59.10.877
  3. Hayes, A. F. (2022). Introduction to mediation, moderation, and conditional process analysis: A regression-based approach (3rd ed.). Guilford Press.
  4. Preacher, K. J., & Hayes, A. F. (2008). Asymptotic and resampling strategies for assessing and comparing indirect effects in multiple mediator models. Behavior Research Methods, 40(3), 879–891. https://doi.org/10.3758/BRM.40.3.879
  5. Zhao, X., Lynch, J. G., Jr., & Chen, Q. (2010). Reconsidering Baron and Kenny: Myths and truths about mediation analysis. Journal of Consumer Research, 37(2), 197–206. https://doi.org/10.1086/651257
  6. Rucker, D. D., Preacher, K. J., Tormala, Z. L., & Petty, R. E. (2011). Mediation analysis in social psychology: Current practices and new recommendations. Social and Personality Psychology Compass, 5(6), 359–371. https://doi.org/10.1111/j.1751-9004.2011.00355.x
  7. Fritz, M. S., & MacKinnon, D. P. (2007). Required sample size to detect the mediated effect. Psychological Science, 18(3), 233–239. https://doi.org/10.1111/j.1467-9280.2007.01882.x
  8. Maxwell, S. E., & Cole, D. A. (2007). Bias in cross-sectional analyses of longitudinal mediation. Psychological Methods, 12(1), 23–44. https://doi.org/10.1037/1082-989X.12.1.23
  9. Kazdin, A. E. (2007). Mediators and mechanisms of change in psychotherapy research. Annual Review of Clinical Psychology, 3, 1–27. https://doi.org/10.1146/annurev.clinpsy.3.022806.091432
How to cite this page

Perquira. (2026, November 30). Moderator vs mediator: the difference, with examples. Perquira Methods Library. https://perquira.com/guides/moderator-mediator

Pq

With care, and with citations.The Perquira team

Written for students and researchers in psychology, psychiatry and behavioral neuroscience. Found an error, or a better source? Write to contact@perquira.com and we will correct it.

More from the Methods Library: How to write a hypothesis · How to find a research gap · Choosing a research design.

PerquiraMethods LibraryExamplePricingAboutPrivacyTermsContact