DEGREE-TWO CURVE FIT
Quadratic Regression Calculator
Fit a parabola to paired observations using least squares. Inspect the fitted curve, vertex, R-squared, RMSE and residuals. Use a quadratic model when a single bend is meaningful for your data.
YOUR DATA
Enter paired observations
Paste or upload numeric X and Y columns. Use a comma, tab or semicolon between columns and a period as the decimal mark. The first non-empty line is a header by default. Up to 5 MB and 5,000 observations are accepted.
The file is read locally in your browser.
YOUR RESULTS
Quadratic fit
Observed values and fitted curve
Points are observations; the curve shows the degree-two least-squares fit.
Residuals by observation
Residual = observed Y − predicted Y.
| Row | Observed Y | Predicted Y | Residual |
|---|
Formula and calculation method
The calculator fits ŷ = α + βz + γz² by least squares, where z = (x − μ) / s, μ is the mean X value, and s is the root mean square distance of X from μ. Centering and scaling X helps the numerical calculation. The displayed equation uses these normalized coordinates; the exported JSON includes α, β, γ, μ and s.
R² = 1 − SSE/SST and RMSE = √(SSE/n). The vertex is reported when γ is nonzero and the values are within the numeric range.
When a quadratic fit is useful
A degree-two curve can describe one broad bend, such as a U-shaped or inverted-U-shaped pattern. It should be chosen because the shape is plausible and supported by the data, not simply because it raises R². The curve can turn sharply outside the observed X range, so avoid extrapolating without domain knowledge.
Assumptions and limitations
- At least three valid observations and enough distinct X values to identify a degree-two curve are required.
- R² measures fit on these input observations. It does not test significance, causation, or performance on new data.
- A quadratic curve has one turning point at most and may not represent more complex patterns.
- RMSE is sensitive to outliers and uses the same units as Y.
- The current limit is 5,000 observations and 5 MB per upload; larger inputs are rejected instead of partly calculated.