Home / Science / Maths, statistics and computing / Statistics / Regression workbenchTool #561

Regression calculator: multiple, polynomial and logistic regression with p-values, VIF, Cook's distance and residual plots

Paste a table or open a CSV or Excel file and fit a multiple linear, polynomial or logistic regression. Get coefficients with standard errors, t or z tests, p-values and confidence intervals, R², adjusted R², AIC and BIC, odds ratios, predictions with intervals, and the diagnostic plots: residuals, Q-Q, leverage and Cook's distance, with VIF. Matches statsmodels.

Keep it one tap away for everyday use.

Bookmark Regression workbench?

Press Ctrl + D now. Your browser opens its own bookmark box, where you choose the name and folder.

  1. Paste data
  2. Pick model
  3. Coefficients
  4. Diagnostics
Nothing is uploadedWorks offline once open

Data

Numbers are used as they are. A column with text (such as soil type) is split into groups, each compared with the first group in A–Z order. Rows with an empty cell or NA in a column the model uses are left out. The examples are made up.

Model

Predictors (x)

Fit

Coefficients

Plots

Rows to look at

Download

Predict

What it does

Regression explains one column (the response, y) with others (the predictors, x). This workbench fits three kinds:

  • Linear, with one or many predictors (multiple regression). A predictor with text in it, such as a soil type or a treatment group, is turned into groups, each compared with the first group in A–Z order.
  • Polynomial in one predictor, up to degree 6, for curved relationships.
  • Logistic, for a yes/no response (0/1, pass/fail, alive/dead). It gives odds ratios and the chance of “yes” for any x.

For each fit you get the equation; a coefficient table with the estimate, standard error, t (or z) statistic, p-value and confidence interval; R² and adjusted R² (McFadden’s R² for logistic); the overall F or likelihood-ratio test; AIC, BIC and the log-likelihood; and a predictor box that gives the predicted value with a confidence interval for the mean and a prediction interval for one new value.

Checking the model

A regression is only as good as its assumptions, so the page draws the standard diagnostic plots:

  • Data with the fitted line or curve and its confidence and prediction bands (for one predictor), or observed against fitted values (for several).
  • Residuals against fitted values: you want a shapeless cloud. A curve means a missing term; a funnel means the spread changes.
  • Normal Q-Q plot of standardized residuals: points near the line mean the errors look normal.
  • Leverage against studentized residual, and Cook’s distance for every row. Rows that stand out are listed so you can check them for typing mistakes.
  • VIF (variance inflation factor) for each predictor: above about 5, predictors overlap so much that their separate effects are uncertain.
  • Durbin–Watson: near 2 means neighbouring residuals are not correlated (matters for data in time order).

How to use it

  1. Paste a table with a header row, open a CSV or Excel file, or start from an example.
  2. Choose the model type, the response and the predictors (or, for a polynomial, the x and the degree).
  3. Leave the intercept on unless theory says the line must pass through zero.
  4. Read the coefficient table and the plots; type values in Predict to use the model.
  5. Download the coefficients and the residuals as CSV, or the whole report as an image, PDF or Word file.

Worked example

The first example is made-up plant growth: height (cm) against fertiliser (g), water (mL a day), light (hours) and soil type, 32 plants. The fit gives R² = 0.8555, adjusted R² = 0.8278 (n = 32), F(5, 26) = 30.79 with p = 3.89 × 10⁻¹⁰. Each extra gram of fertiliser adds 1.8328 cm (p = 1.21 × 10⁻⁸), other things equal. Loam is 2.1123 cm taller than clay, but p = 0.154, so the data cannot tell that apart from no difference. All VIFs are below 1.7. For 5 g of fertiliser, 250 mL of water, 8 hours of light and loam, Predict gives 40.94 cm, with a 95 % prediction interval of 34.43 to 47.45 cm.

The logistic example (made-up exam results for 40 students) gives an odds ratio of 2.11 per hour of study: each hour roughly doubles the odds of passing. A student who studied 6 hours and did 2 practice tests has a predicted chance of 0.4314 (95 % CI 0.1969 to 0.7013).

What it does not do

There are no interaction terms, random effects, weights, stepwise selection or robust standard errors. To model an interaction, add a column that is the product of the two predictors. For curved relationships with a known equation (such as exponential decay) a non-linear fit is better.

Frequently asked questions

R² went up when I added a predictor. Is the model better? Not necessarily: R² never falls when you add a column. Compare adjusted R², AIC or BIC instead; lower AIC is better.

What does “separation” mean? In logistic regression, if one x splits the yeses from the noes perfectly, the best coefficient is infinite. The page warns you; the numbers are then not reliable.

Is my data uploaded? No. Everything runs in your browser; nothing is stored or sent.

Where the numbers come from

  • Methods: least squares by Householder QR; logistic regression by iteratively reweighted least squares; standard textbook formulas for leverage, studentized residuals, Cook's distance, VIF and Durbin–Watson.
  • Checked against statsmodels 0.15.0 (OLS, Logit, GLM Binomial influence, variance_inflation_factor, get_prediction) on all three examples, and against 60-digit mpmath for a badly conditioned degree-5 polynomial.
  • The three example data sets (plant growth, stopping distance, exam results) are made up for this tool.

Standard scientific values, such as constants, atomic weights and melting points, are facts found in every textbook; we name where ours were checked. If you are an author or publisher and want a value, a credit or a table changed or removed, tell us and we will act quickly.

Last updated 2026-11-09.

Related tools

Calibration curve with LOD and LOQ #28 Paste your standards and get the calibration line, R², limits of detection and quantitation (ICH Q2), and the concentration of each unknown with a 95 % interval. Sample size and power calculator #32 How many subjects, samples or survey responses do you need? Sample size for comparing two means, paired data, two proportions, or a survey's margin of error, with power curves. Matches R and G*Power. Publication plot maker #27 Paste columns or open a CSV or Excel file and get a clean scientific figure with error bars, sized for a journal column. Download vector SVG or PDF, or PNG at 300 or 600 dpi. Your data stays in your browser. Hypothesis test chooser and runner #560 Answer three questions and the right test is picked for you, then run it on your pasted data: t tests (one-sample, Welch, Student, paired), ANOVA with Tukey HSD, chi-square, Fisher's exact, Mann-Whitney, Wilcoxon, Kruskal-Wallis and Shapiro-Wilk. Plain-English results, effect sizes and assumption checks. Matches scipy. Probability distribution explorer #563 Pick a distribution (normal, t, chi-squared, F, beta, gamma, Weibull, binomial, Poisson and 26 more), set its parameters and see the curve with the probability between two values shaded, the quantiles, mean, variance, skewness and kurtosis, and draw seeded random samples. Matches scipy.stats. Time series decomposition and ARIMA #566 Paste a series and split it into trend, season and remainder (STL or classical), see the ACF and PACF with confidence bands, try differencing, and fit an ARIMA(p, d, q) model by exact maximum likelihood with forecasts, 80 % and 95 % intervals and a Ljung-Box check. Matches statsmodels. Design of experiments generator #567 Plan an experiment: full factorial, 2^(k−p) fractional factorial with its alias table, Plackett-Burman screening, central composite or Box-Behnken response-surface designs. Get a randomised run sheet (seeded, so you can repeat it) as CSV, then paste your results to see which factors matter.