Mediation Analysis Calculator

Enter the path coefficients (a and b) and their standard errors (SEa and SEb) to run a Sobel Test for Mediation Analysis. You get back the Sobel z-statistic, p-value, and indirect effect — telling you whether a mediator variable significantly carries the influence of an independent variable to a dependent variable.

Unstandardized regression coefficient for the path from the independent variable (X) to the mediator (M).

Unstandardized regression coefficient for the path from the mediator (M) to the dependent variable (Y), controlling for X.

Standard error of the path coefficient a (X → M).

Standard error of the path coefficient b (M → Y).

Significance threshold for determining whether mediation is statistically significant.

Results

Sobel Z-Statistic

--

Two-Tailed p-Value

--

Indirect Effect (a × b)

--

Standard Error of Indirect Effect

--

Goodman (1959) Z-Statistic

--

Aroian / Goodman (1960) Z-Statistic

--

Mediation Significance

--

Test Statistic Comparison (|Z| values)

Results Table

Frequently Asked Questions

What is mediation analysis and when should I use it?

Mediation analysis tests whether a third variable (the mediator) explains the relationship between an independent variable (X) and a dependent variable (Y). Use it when you have a theoretical reason to believe X influences M, and M in turn influences Y — for example, whether stress (X) affects health outcomes (Y) through sleep quality (M).

What does the Sobel test actually measure?

The Sobel test evaluates whether the indirect effect of X on Y through M (calculated as a × b) is statistically different from zero. It computes a z-statistic by dividing the indirect effect by its standard error, then derives a two-tailed p-value. A significant result (typically p < 0.05) indicates meaningful mediation.

What are path coefficients a and b?

Path coefficient a is the unstandardized regression coefficient from the independent variable (X) to the mediator (M). Path coefficient b is the unstandardized regression coefficient from the mediator (M) to the dependent variable (Y), controlling for X. Both come from standard ordinary least squares regression analyses.

What is the difference between Sobel, Goodman (1959), and Aroian test statistics?

All three test the same indirect effect but differ slightly in their standard error formula. The Sobel test omits the term (SEa² × SEb²), the Aroian test includes it, and Goodman's (1959) test subtracts it. The Aroian/Goodman (1960) version is considered the most conservative and is generally recommended for small samples.

Is the Sobel test appropriate for small samples?

No — the Sobel test assumes a normal distribution of the indirect effect, which only holds well in large samples (typically n > 200). For smaller samples, bootstrapping methods (such as those available in Hayes' PROCESS macro) are strongly preferred because they impose no distributional assumptions and tend to be more accurate.

What does a non-significant Sobel test result mean?

A non-significant result (p > α) means there is insufficient evidence that the mediator significantly transmits the effect of X to Y. However, this does not necessarily mean no mediation exists — the test may simply lack power, particularly in small samples. Consider using bootstrapping or increasing your sample size.

What is full versus partial mediation?

Full mediation occurs when the direct effect of X on Y becomes non-significant after controlling for the mediator M, while the indirect effect (a × b) remains significant. Partial mediation means both the direct and indirect effects are significant, indicating M explains some but not all of the X→Y relationship.

How do I obtain the standard errors SEa and SEb for this calculator?

Run two separate regression analyses. First, regress M on X to get coefficient a and its standard error SEa. Second, regress Y on both X and M to get coefficient b and its standard error SEb. Most statistical software (SPSS, R, Python, Stata) reports these standard errors automatically in the regression output table.

More Statistics Tools