Math Calculators

← All calculators

Breusch-Godfrey and White Test Calculator

Both LM tests run from your residuals and regressors, in your browser.

Your residuals and regressors, or your data

The tool fits y on an intercept and the regressor columns by OLS, takes the residuals in row order, and runs both tests on them. Add a second line for a second regressor.

Breusch-Godfrey lagged residuals are filled with zeros at the start of the sample, and that convention is printed with every result. Nothing is sent anywhere: the tests run in your browser.

Your answer first: both LM statistics, degrees of freedom, p values and verdicts

This Breusch-Godfrey and White test calculator computes both tests from your data: paste your residuals and your model regressors, or paste x and y data and let the tool fit the model, and it runs both auxiliary regressions itself and returns the LM statistic, the degrees of freedom, the chi-square p value and a plain verdict for each test.

Paste your residuals and regressors, or your x and y data, choose the lag order p, and this calculator returns the Breusch-Godfrey LM statistic with p degrees of freedom and the White LM statistic with q degrees of freedom, each with its chi-square p value and verdict. On the worked example loaded when the page opens, Breusch-Godfrey at p = 1 gives LM 8.6131 (p 0.0033, serial correlation detected at the 5 percent level) and White gives LM 1.0559 (p 0.5898, no evidence against constant variance).

Observations n

-

Lag order p

-

Breusch-Godfrey auxiliary R squared

-

Breusch-Godfrey LM statistic

-

Breusch-Godfrey degrees of freedom

-

Breusch-Godfrey p value

-

Breusch-Godfrey verdict

-

White auxiliary R squared

-

White LM statistic

-

White degrees of freedom q

-

White p value

-

White verdict

-

Steps, shown in full

    By Waqar Ghouri, founder of CalcMega · Last verified: 12 November 2026

    Two diagnostics share this page: Breusch-Godfrey looks for correlation between a residual and the residuals before it, and White looks for a pattern in how large the residuals are across the regressors.

    On the 12 observations loaded when the page opens, Breusch-Godfrey at p = 1 gives LM 8.6131 with p 0.0033, so serial correlation is detected at the 5 percent level, while White gives LM 1.0559 with p 0.5898, so there is no evidence against constant variance.

    TestAuxiliary R squaredLMDegrees of freedomp valueVerdict at 5 percent
    Breusch-Godfrey, p = 10.7830108.613110.0033Reject the null
    Breusch-Godfrey, p = 20.8474378.474420.0144Reject the null
    White, one regressor0.0879891.055920.5898Fail to reject
    White, two regressors0.2409082.890950.7168Fail to reject

    Ryan O'Connell Finance's serial correlation and heteroskedasticity tools take an externally computed R squared and interpret it, while this calculator runs both auxiliary regressions itself from your residuals and regressors.

    Worked example: Breusch-Godfrey LM 8.6131 (p 0.0033) and White LM 1.0559 (p 0.5898) on the same 12 observations

    The data loaded when the page opens are 12 observations: x runs from 1 to 12 and y runs 2.1, 3.9, 6.2, 7.8, 10.3, 11.7, 14.2, 15.9, 18.1, 20.2, 21.8, 24.3. The OLS fit in the tool gives an intercept of -0.0061 and a slope of 2.0073, and the residuals from that fit are what both tests examine. The same residuals pass one diagnostic and fail the other, which is exactly why the two tests sit side by side.

    For Breusch-Godfrey at p = 1, the auxiliary regression of each residual on the regressor and the first lagged residual gives an R squared of 0.783010. The governed statistic is LM = (12 - 1) x 0.783010 = 8.6131 on 1 degree of freedom, with p 0.0033: serial correlation is detected at the 5 percent level. At p = 2 the auxiliary R squared is 0.847437 and LM is 8.4744 on 2 degrees of freedom, with p 0.0144. For White, the auxiliary regression of the squared residuals on the regressor and its square gives an R squared of 0.087989, so LM = 12 x 0.087989 = 1.0559 with q 2 and p 0.5898: no evidence against constant variance.

    The two-regressor check: White LM 2.8909 with q 5 and p 0.7168

    Add a second regressor line, x2 = 3, 1, 4, 1, 5, 9, 2, 6, 5, 3, 5, 8, to the same y values and the White auxiliary design grows to five distinct terms: the two levels, the two squares and the cross product. The auxiliary R squared is 0.240908, so LM = 12 x 0.240908 = 2.8909 with q 5 and p 0.7168. The degrees of freedom moved because the fitted design moved, not because a formula assumed five in advance.

    What are the Breusch-Godfrey and White tests?

    The Breusch-Godfrey test is an LM test for serial correlation up to order p in regression residuals, and the White test is an LM test for heteroskedasticity that regresses the squared residuals on the regressors, their squares and their cross products.

    This calculator computes the Breusch-Godfrey and White tests from your residuals and regressors, running both auxiliary regressions in the tool.

    The two tests answer different questions about the same residuals. Breusch-Godfrey asks whether a residual can be predicted from the residuals before it, which is the signature of serial correlation left in the model. White asks whether the size of the residuals follows any pattern in the regressors, their squares and their cross products, which is the signature of an error variance that does not stay constant. A model can fail either one and pass the other, as the worked example shows. Picking the test starts with the data type: residuals from a regression call for diagnostics like these, while counts in a contingency table call for an association measure, which is what the Cramér's V Calculator computes.

    This tool's pair is Breusch-Godfrey and White. Durbin-Watson and Breusch-Pagan are a different test pair, computed by the separate Regression Residual Diagnostics Calculator on this site. The two tools are siblings, not copies, and each page says plainly which pair it runs.

    How is the Breusch-Godfrey test calculated?

    Fit the model, keep its residuals in order, then regress each residual on the original regressors plus p lagged residuals. The leading lagged values, which have no earlier residual to copy, are filled with zeros, and that convention is printed with the result. The test statistic is built from the R squared of that auxiliary regression, and the lag order p is yours to choose in the tool.

    The test stays valid when the model itself contains lagged values of the dependent variable, and it tests every order up to p at once rather than only the first lag. That is the ground it holds over a first-order only check: a process whose correlation shows up at lag two or three is invisible to a lag one statistic and visible here.

    The form this tool prints: LM = (n minus p) times the auxiliary R squared

    This tool prints LM = (n minus p) times the auxiliary R squared, against a chi-square distribution with p degrees of freedom. A second form, n times the auxiliary R squared, circulates as a large sample variant and gives a slightly larger statistic on the same data: on the worked example it would print 9.3961 in place of 8.6131. The two forms differ slightly, and the label on this page always names the form in use, so a figure from this tool can be matched against the right formula.

    How is the White test calculated, and how is q counted?

    Square each residual, then regress those squares on the regressors, their squares and every pairwise cross product, with an intercept. The statistic is LM = n times the auxiliary R squared. Because the auxiliary design is built from your regressors, the count of terms depends on the model you fitted, and duplicate or constant terms are removed before fitting: the square of a binary regressor is the regressor itself, so it enters once, not twice.

    That count is q, the degrees of freedom, and the tool counts it from the design it actually fitted and prints it with the result, naming any term it dropped. With one regressor q is 2. With two regressors q is 5. A White result also carries a standing caution: the auxiliary regression responds to any pattern in the squared residuals, so a significant result can reflect a misspecified mean model as well as a changing variance.

    What this calculator does not cover

    This page is an educational aid. It does not give statistical advice. The numbers it prints describe the residuals you paste in, and they do not decide whether a model is fit to use.

    The tool runs Breusch-Godfrey and White only. It does not run Durbin-Watson or Breusch-Pagan; those two tests are computed by the separate Regression Residual Diagnostics Calculator on this site. It does not run a Ramsey RESET test, and it tests heteroskedasticity in the White form only.

    The lag order p is yours to choose, and the leading lagged residuals are filled with zeros, so the first p rows of the auxiliary regression carry that convention. Where the tests cannot be computed, for example when every residual is zero or the auxiliary design has too few observations, the tool says so and prints no statistic in place of a result.

    Breusch-Godfrey and White Test Calculator FAQs

    What do the Breusch-Godfrey and White tests check?

    The Breusch-Godfrey test checks for serial correlation in regression residuals up to an order p that you choose. The White test checks for heteroskedasticity in general form, without assuming any shape for the error variance. Both are Lagrange multiplier tests: each runs an auxiliary regression and forms an LM statistic that follows a chi-square distribution under its null hypothesis.

    How is the Breusch-Godfrey test calculated on this page?

    Paste your residuals and your model regressors, or paste x and y data and let the tool fit the model by OLS. The tool regresses each residual on the original regressors plus p lagged residuals, with the leading lagged values filled with zeros and that convention printed with the result. It then prints LM = (n minus p) times the auxiliary R squared, against a chi-square distribution with p degrees of freedom. On the worked example with 12 observations and p = 1, the auxiliary R squared is 0.783010, so LM is 8.6131 with p 0.0033.

    How is the White test calculated, and what is q?

    The tool regresses the squared residuals on your regressors, their squares and their pairwise cross products, with an intercept, and removes duplicate or constant terms before fitting: the square of a binary regressor duplicates its level, for example. The statistic is LM = n times the auxiliary R squared, and q, the degrees of freedom, is the count of distinct non-constant terms actually fitted, which the tool prints with the result. On the worked example with one regressor, q is 2, the auxiliary R squared is 0.087989 and LM is 1.0559 with p 0.5898.

    When should I use Breusch-Godfrey instead of Durbin-Watson?

    Use Breusch-Godfrey when you need to test beyond first-order serial correlation, and whenever your model includes lagged values of the dependent variable among the regressors. The Durbin-Watson statistic is biased toward 2 in that case, which can hide the serial correlation you are testing for. Breusch-Godfrey stays valid there and gives a plain reject or fail-to-reject verdict with no inconclusive zone.

    What does a significant result mean for each test?

    A significant Breusch-Godfrey result, a p value below your chosen level, is evidence of serial correlation up to order p in the residuals. A significant White result is evidence against constant error variance, and it can also reflect model misspecification, because the White auxiliary regression responds to any pattern in the squared residuals, not only to a changing variance.

    Does this calculator also run Durbin-Watson or Breusch-Pagan?

    No. This calculator computes the Breusch-Godfrey and White tests only. Durbin-Watson and Breusch-Pagan are a different test pair, and they are computed by the separate Regression Residual Diagnostics Calculator on this site. The two tools are siblings, not copies: Breusch-Godfrey tests higher orders and stays valid with lagged dependent variables, where Durbin-Watson does not, and White tests the general squares and cross products form, where Breusch-Pagan tests only its fitted value form.

    Sources: Breusch (1978), Godfrey (1978) and White (1980)

    The serial correlation test follows Breusch (1978) and Godfrey (1978), who set out the Lagrange multiplier form used here. The heteroskedasticity test follows White (1980), published in Econometrica, who proposed the squares and cross products auxiliary regression and the n times R squared statistic. The lag convention, the governed statistic forms and the counted degrees of freedom on this page all follow those sources as described in the sections above.

    White (1980), "A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity", Econometrica 48(4): 817-838. DOI: 10.2307/1912934.

    Sources last verified 12 November 2026. Search volume, CPC and keyword difficulty were not measured for this page, and no figure of that kind is printed here.

    Related calculators

    ➗
    GCD & LCM Calculator

    Greatest common divisor and least common multiple — Euclid's steps shown, exact at any size.

    📊
    Statistics Calculator

    Mean, median, mode, variance, standard deviation and quartiles for any data set.

    📊
    Cramér's V and Phi Coefficient Calculator

    Cramer V, phi and Bergsma bias corrected V from a contingency table.

    🔁
    Fixed-Point Iteration Calculator

    Fixed point iteration with Aitken delta squared acceleration beside raw iterates.

    〰️
    Cubic Spline Interpolation Calculator

    Cubic spline interpolation with natural, clamped and not a knot end conditions.

    🔢
    Sign Test Calculator

    Exact sign test for a median with a distribution free confidence interval.

    📂
    All Math Calculators

    Browse every calculator in this category.