This web page contains various Excel templates which help interpret two-way and three-way interaction effects. They use procedures by Aiken and West (1991), Dawson (2014) and Dawson and Richter (2006) to plot the interaction effects, and where appropriate conduct post-hoc tests on the slopes.
Links to: Two-way interactions - Three-way interactions - Quadratic effects
Troubleshooting & further information - About me (Jeremy Dawson)
Two-way interactions
To test for two-way interactions (often thought of as a relationship between an independent variable (IV) and dependent variable (DV), moderated by a third variable), first run a regression analysis, including both independent variables (referred to hence as the IV and moderator) and their interaction (product) term. It is recommended that the independent variable and moderator are centred (so that the mean is zero) before calculation of the product term, although this is not essential. The product term should be statistically significant in the regression equation in order for the interaction to be interpretable.
You can then plot the interaction effect using the following Excel template. You will need to enter the unstandardised regression coefficients (including intercept/constant) and means & standard deviations of the IV and moderator in the cells indicated. If you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you centre (or standardise) all control variables first (although even if you don't the pattern, and therefore the interpretation, will be correct). If your moderator is binary, ensure you enter the actual values of this variable in the relevant cells.
A note about simple slope tests. This template also allows you to perform simple slope tests: these are conditional hypothesis tests of whether the relationship between IV and DV is significant at a particular value of the moderator. If your moderator is a numerical variable, these are not necessary, but may be useful at specific, theoretically interesting values of the moderator.
Therefore where possible, meaningful values should be chosen, rather than just one standard deviation above and below the mean (which is where they will be tested by default if you leave cells B31 & B32 blank); otherwise the tests are arbitrary in nature and quite possibly meaningless. To run simple slope tests, you will also need to request the coefficient covariance matrix as part of the regression output. If you are using SPSS, this can be done by selecting "Covariance matrix" in the "Regression Coefficients" section of the "Statistics" dialog box. Note that the variance of a coefficient is the covariance of that coefficient with itself - i.e. can be found on the diagonal of the coefficient covariance matrix.
Nonlinear two way interactions. If your relationships are nonlinear (including generalised linear models), you may wish to use one of the following templates. However, I strongly recommend reading Rönkkö et al. (2021) in order to specify and interpret generalised linear models with interaction terms correctly - you’ll find the reference towards the bottom of this page.
For plotting curvilinear interactions between a quadratic main effect and a moderator (see also below)
For plotting interactions from binary logistic regression
For plotting interactions from generalised linear models with a Poisson outcome, or any other log link (e.g. negative binomial).
A note about centred and standardised variables. Centred variables are the same as the original version, with the variable mean subtracted so that the new mean is zero. Standardised variables are those that are both centred around zero and are rescaled so that they have a standard deviation of 1. Following Aiken and West (1991), I recommend that for analysis variables are centred. Some researchers may prefer to use standardised variables (which can be produced automatically in the “Descriptives” procedure in SPSS, for example).
Each method leads to different considerations in interpreting the coefficients - see Dawson (2014) for more about this. I prefer to use centred variables if they are continuous, because the X and X coefficients can then be interpreted as the average effect of that variable across all values of the other variable. However, the findings obtained should be identical whichever method you use. If you choose to analyse centred (or standardised) variables, you should use the regular versions of the Excel templates, and enter the mean of the variables as zero (and standard deviation as 1 if using standardised versions).
And for those readers who use the US version of English, for "centred" and "standardised", read "centered" and "standardized"!
Three-way interactions
To test for three-way interactions (often thought of as a relationship between a variable X and dependent variable Y, moderated by variables Z and W), run a regression analysis, including all three independent variables, all three pairs of two-way interaction terms (i.e. XZ, XW and ZW), and the three-way interaction term (XZW). It is recommended that all the independent variable are centred before calculation of the product terms, although this is not essential. As with two-way interactions, the interaction terms themselves should not be centred (or standardised) after calculation. The three-way interaction term should be statistically significant in the regression equation in order for the interaction to be interpretable.
If you wish to use the Dawson & Richter (2006) test for differences between slopes, you should request the coefficient covariance matrix as part of the regression output. If you are using SPSS, this can be done by selecting "Covariance matrix" in the "Regression Coefficients" section of the "Statistics" dialog box. Note that the variance of a coefficient is the covariance of that coefficient with itself - i.e. can be found on the diagonal of the coefficient covariance matrix.
You can then plot the interaction effect using the following Excel template. You will need to enter the unstandardised regression coefficients (including intercept/constant) and means & standard deviations of the three independent variables (X, Z and W) in the cells indicated. If you have control variables in your regression, the values of the dependent variable displayed on the plot will be inaccurate unless you centre (or standardise) all control variables first (although even if you don’t the pattern, and therefore the interpretation, will be correct). To use the test of slope differences, you should also enter the covariances of the XZ, XW and XZW coefficients from the coefficient covariance matrix, and the total number of cases and number of control variables in your regression. If any of your variables is binary, ensure you enter the actual values of this variable where stated.
Simple slope tests. As with the 2-way interactions above, this template also allows you to perform simple slope tests, as well as the slope difference tests. See my warnings above (in the two-way interactions section) about the use of simple slope tests, however.
Nonlinear three-way interactions. If your relationships are nonlinear (including generalised linear models), you might want to use one of the following templates:
For plotting curvilinear interactions between a quadratic main effect and two moderators (see below)
For plotting three-way interactions from binary logistic regression
For plotting three-way interactions from generalised linear models with a Poisson outcome, or any other outcome using a log link (e.g. negative binomial)
Quadratic interactions
If you wish to plot a quadratic (curvilinear) effect, you can use one of the following Excel templates. In each case, you test the quadratic effect by including the independent variable (let’s call it X) along with its squared term (i.e. X*X) in the regression. In the case of a simple (unmoderated) relationship, the significance of the squared term (XX) determines whether there is a quadratic effect.
If you are testing a moderated quadratic relationship, it is the significance of the interaction between the squared term and the moderator(s) (say XXZ) that determines whether there is a moderated quadratic effect - that is, whether the curvature differs at different levels of the moderator. If the variable X has been centred before the analysis, then a significant XZ term shows that the position of the curve (rather than its curvature) differs at different levels of Z.
Note that all lower order terms need to be included in the regression: so, if you have an independent variable X and moderators Z and W, then to test whether there is a three-way interaction you would need to enter all the following terms: X, XX, Z, W, XZ, XXZ, XW, XXW, ZW, XZW, XXZW. It is only the last, however, that determines the significance of the three-way quadratic interaction effect.
For plotting simple quadratic effects (no moderators)
For plotting quadratic effects with one moderator
For plotting two-way interactions with a linear independent variable effect, but a quadratic moderator effect
For plotting quadratic effects with two moderators
Troubleshooting
References
Citing this page
Other resources
There are a number of common problems encountered when trying to plot these effects. If you are having problems, consider the following:
If the graph does not appear, it may be because it is off the scale. You can change the scale of the dependent variable by right-clicking on the axis and choosing "Format Axis"
Make sure you enter the unstandardised (raw) regression coefficients, whether or not you are using centred/standardised variables
If you use centred (or standardised) variables, ensure that you calculate the interaction (product) terms from the centred (or standardised) variables, but do not centre the interaction terms themselves
When performing simple slopes or slope difference tests, it is easy to enter incorrect figures for variances & covariances of coefficients! You may need to get more decimal places than is provided automatically in the output, as these numbers can often be small. In SPSS, this can be done by double clicking on the table, for example.
Also, SPSS is prone to printing the covariances of regression coefficients in a different order from how the coefficients appear themselves, which can be confusing. In addition, SPSS automatically prints a correlation matrix of the coefficients above the variance-covariance matrix: ensure that you do not enter these in error.
Note that the variances of the coefficients are along the diagonal of this matrix: e.g. the variance of the Var1*Var2 coefficient is the covariance of this coefficient with itself. (Be careful not to enter the variance of the variables themselves - these are not the same!)
If you think there are any errors in these sheets, please contact me (see below for contact details).
Aiken, L. S., & West, S. G. (1991). Multiple regression: Testing and interpreting interactions. Newbury Park, London, Sage.
Dawson, J. F. (2014). Moderation in management research: What, why, when and how. Journal of Business and Psychology, 29, 1-19. (This article includes information about most of the tests included on this page, as well as much more! Click here for the original version this article, or here for a repository copy that is not behind a paywall.)
Dawson, J. F., & Richter, A. W. (2006). Probing three-way interactions in moderated multiple regression: Development and application of a slope difference test. Journal of Applied Psychology, 91, 917-926. https://doi.org/10.1037/0021-9010.91.4.917
Rönkkö, M., Aalto, E., Tenhunen, H., & Aguirre-Urreta, M. I. (2021). Eight Simple Guidelines for Improved Understanding of Transformations and Nonlinear Effects. Organizational Research Methods, 25(1), 48-87. https://doi.org/10.1177/1094428121991907
There is no requirement from me to cite this page just because you use one of the templates to plot your interactions. However, I know that some people want to be able to provide a reference for what they are doing! I suggest the following:
If you want to cite the methods used, then I recommend citing (and reading!) the Dawson (2014) article listed above. All of the methods currently on this page are covered in the article, and this page is mentioned in the article itself
If you need to cite this page specifically, then the way you need to do this depends on the format required for your publication: but the APA format would be as follows:
Dawson, J. F. (2025). Interpreting interaction effects [web page]. Retrieved [DATE], from https://www.jeremydawson.com/slopes
Mikko Rönkkö’s YouTube channel contains some great resources to demonstrate how to do some of these tests, especially using Stata. This includes the video recording of a Professional Development Workshop given at the 2023 Academy of Management conference by Mikko and myself.
Kristopher Preacher's web site contains templates for testing simple slopes, and findings regions of significance, for both 2-way and 3-way interactions. It also includes options for hierarchical linear modelling (HLM) and latent curve analysis.
About me (Jeremy Dawson)
I’m a statistician based at the University of Sheffield, where I work jointly between the Management School and the School of Medicine and Population Health. Though my job title is Professor of Health Management - because much of my substantive research is in that area - most of my teaching, and a lot of the research that I enjoy doing, is about statistics!
I’m also a keen musician (singing tenor, playing cello, and occasionally euphonium!) and am heavily involved in organising Steel City Choristers (an independent cathedral-style choir based in Sheffield), and Hallam Sinfonia, as well as being an Extreme Cellist!
If you want to get in touch, please see my contact details here.