ANCOVA calculator
Compare group means while controlling for a continuous covariate. Compute adjusted means and F-tests online.
What it does
Compares group means on an outcome while adjusting for one or more continuous covariates, removing variation the covariate explains.
When to use it
Groups differ on something measurable that also affects the outcome — baseline severity, age — and you want the group comparison net of it.
Worked example
You compare a new physiotherapy programme against usual care on six-month mobility scores, but the two groups started at different baselines. ANCOVA compares the six-month scores while adjusting for the baseline score, so the comparison is not just measuring who started better.
Cautions
- ANCOVA assumes the covariate's slope is the same in every group. If the slopes differ, the adjusted comparison is not meaningful — test the group × covariate interaction before trusting it.
- Adjusting for a variable that is itself affected by the grouping removes part of the effect you are trying to measure.
- On observational data, adjustment reduces confounding but does not remove it. Unmeasured confounders remain.
Alternatives
- Two-way ANOVA — the thing you are adjusting for is categorical
- Linear regression — you want the covariate's own slope reported as a result rather than treated as a nuisance
How to read the output
- Adjusted group effect (F, p)
- The group difference evaluated at the average value of the covariate, with the covariate's own contribution removed from the residual. Adjustment is not randomisation. On observational data this removes the covariate you named and nothing else; residual confounding by anything unmeasured survives untouched.
- The covariate row
- Whether the covariate itself relates to the outcome. A covariate carrying nothing spends a degree of freedom for no gain.
- Homogeneity of regression slopes
- ANCOVA assumes the covariate has the SAME slope in every group. If it does not, there is no single adjusted difference to report. This is not tested here. Test it by fitting group × covariate as an interaction in the Regression tab; if it is substantial, report the group difference at specific covariate values rather than one adjusted mean.
- p-value
- How surprising a difference at least this large would be IF the groups really were identical on this measure. A small p means the data would be surprising under that assumption. It is not the probability that the result is due to chance, and not the probability that the groups are the same — those read the conditional backwards. It also answers 'would this be surprising?', never 'is this big enough to matter?': with a large sample a trivial difference returns a small p, and the result looks identical to an important one.
How this calculator is validated · Which statistical test should I use?