Quadratic Regression Calculator
Fit a second-degree polynomial to paired x and y observations using least squares. Explore the fitted equation, the coefficient of determination and how the curve compares with your data.
Your quadratic regression model
Enter at least three valid x–y pairs, or choose an example, then select Calculate.
Show calculation
How to use this calculator
- Enter at least three x–y pairs, with a different x value for at least three observations.
- Select Calculate to fit a quadratic curve by least squares.
- Read the fitted equation and R², then inspect the graph and residuals to assess the pattern.
Quadratic regression equation
The model is ŷ = ax² + bx + c. Least squares chooses a, b and c to minimize the sum of squared vertical residuals, Σ(yᵢ − ŷᵢ)². The coefficient of determination is R² = 1 − SSE/SST when SST > 0, where SST = Σ(yᵢ − ȳ)².
How to interpret the curve
The coefficient a determines the direction of curvature: a positive value opens upward and a negative value opens downward. The vertex of a nonzero quadratic term is at x = −b/(2a). A high R² describes the fit to the entered observations; it does not establish causation or guarantee reliable predictions beyond the data range.
Worked example — exact quadratic pattern
This example uses sample values, not your current inputs.
For (x, y) pairs (−2, 3), (−1, 0), (0, 1), (1, 6) and (2, 15), quadratic least squares gives ŷ = 2x² + 3x + 1. Every point lies on the curve, so SSE = 0 and R² = 1.
Frequently asked questions
What is quadratic regression?
Quadratic regression fits a second-degree polynomial to paired data. It is useful when the relationship bends upward or downward instead of following a straight line.
How is quadratic regression different from linear regression?
A linear model has a constant slope. A quadratic model adds an x² term, allowing one turning point and a changing slope.
How many data points do I need?
At least three observations with three distinct x values are needed for a full quadratic fit. Additional observations make it possible to assess residual variation beyond an exact three-point fit.
What does R² mean?
R² compares the model's residual sum of squares with the variation in the observed y values. It describes in-sample fit, not whether the model is appropriate for every purpose.
Can I predict values outside the observed x range?
The equation can be evaluated outside the data range, but this is extrapolation. Quadratic curves can change rapidly, so extrapolated predictions may be unreliable.
Scientific foundations and academic references
The mathematical foundations, computational method and limitations of this tool.
Foundational research
A.-M. Legendre, Nouvelles méthodes pour la détermination des orbites des comètes (historical Smithsonian catalogue)
Adrien-Marie Legendre's Nouvelles méthodes pour la détermination des orbites des comètes (1805/1806 publication history) is an early published treatment of the least-squares principle. Quadratic regression applies that principle to a three-column polynomial design matrix; Legendre's work did not introduce this website's implementation.
Read source (opens in a new tab)Theoretical development · 1809
C. F. Gauss, Theoria motus corporum coelestium (1809)
Gauss's Theoria motus corporum coelestium (1809) developed the theory and applications of fitting observations. Modern least-squares computation is more reliably performed through stable matrix factorizations than by directly solving ill-conditioned normal equations.
Read source (opens in a new tab)Golub & Van Loan, Matrix Computations, 4th ed. (2013)
Read source (opens in a new tab)Authoritative technical references
NumPy, Polynomial.fit
NumPy, Polynomial.fit
NumPy's Polynomial.fit documentation describes least-squares fitting with a scaled domain to improve conditioning. R's lm documentation describes linear models with multiple predictors, which include x and x² as separate columns.
Read source (opens in a new tab)Computational method and verification
Numerical computation
The calculator fits the full-rank quadratic design by numerically stable least squares using centered/scaled x values and converts coefficients to the original x basis. Fitted values, residuals and R² are calculated from the original y data, without changing the fitted model when display precision changes. The procedure is descriptive and does not automatically establish a causal or predictive relationship. Residual standard error = sqrt(SSE / (n − 3)), available only when n > 3.
- (−2,3), (−1,0), (0,1), (1,6), (2,15)
- ŷ = 2x² + 3x + 1; R² = 1
- (0,1), (1,2), (2,3), (3,5)
- a = 0.25; b = 0.55; c = 1.05; SSE = 0.05
- Constant Y, distinct X values
- R² undefined because SST = 0
Scope and limitations
The fitted model is ŷ = ax² + bx + c. Coefficients minimize the sum of squared residuals in the original y values. A full-rank, centered/scaled least-squares solution is used to reduce numerical instability. R² = 1−SSE/SST is shown only when SST is positive; Residual standard error = sqrt(SSE / (n − 3)) requires more than three observations. Predictions outside the data range are extrapolations.
Read full methodologyCite this tool
Use the following citation when referencing this calculator.
APA 7th edition
Statistics Calculator Lab. (2026). Quadratic Regression Calculator [Online calculator]. https://statscalculator.org/quadratic-regression-calculator/
Show BibTeX
@misc{statscalculator_quadratic_regression_2026,
author = {{Statistics Calculator Lab}},
title = {Quadratic Regression Calculator},
year = {2026},
howpublished = {Online calculator},
url = {https://statscalculator.org/quadratic-regression-calculator/}
}