Explained Variance Calculator
Calculate the explained variance score for a regression model's predictions.
About Explained Variance Calculator
The explained variance score measures how much of the variance in the actual values is captured by the model, ignoring any constant bias: EV = 1 − Var(y − ŷ) / Var(y). It's closely related to R², but R² also penalizes systematic bias (a constant offset between predictions and actuals), while explained variance only looks at how well the model captures the spread of the data. A score of 1.0 means the model perfectly explains all variability, and 0.0 means it explains none.
Formula
EV = 1 - Var(y - y_hat) / Var(y)
- Var(y - \hat{y})
- Variance of residuals
- Var(y)
- Variance of actual values
Worked example
With the default values below, Explained Variance Calculator returns Explained Variance Score of 0.9572. Change any input above and every figure here is recalculated in your browser.
Inputs used
- Actual Values
- 3, -0.5, 2, 7
- Predicted Values
- 2.5, 0.0, 2, 8
Results
- Explained Variance Score
- 0.9572
- Residual Variance
- 0.3125
- Actual Value Variance
- 7.2969
Step by step
- 1Residuals: y_i − ŷ_i= [0.500, -0.500, 0.000, -1.000]
- 2Variance of residuals: Var(y − ŷ)= 0.3125
- 3Explained variance: 1 − Var(y − ŷ) / Var(y)= 0.9572
Assumptions and limits
- The result is derived only from the 2 inputs listed above. Anything not among them is not part of the calculation.
- In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
- Figures are rounded for display to 4 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.
How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.
Frequently Asked Questions
How is explained variance different from R²?
R² penalizes both variance mismatch and any systematic bias (mean offset) between predictions and actuals, while explained variance only measures variance mismatch — if a model's predictions are shifted by a constant amount but track the actual values' ups and downs perfectly, explained variance would still be close to 1 even though R² would be lower.
Can explained variance be negative?
Yes — like R², if the residual variance is larger than the variance of the actual values themselves, explained variance becomes negative, indicating the model performs worse than a naive constant prediction in terms of capturing variability.
When should I prefer explained variance over R²?
Use explained variance when you specifically care about whether the model captures the pattern/spread of the data and are less concerned about a constant systematic bias, which some post-processing or calibration step could correct separately.
