Calculator Inputs
Enter paired x and y values, select the degree, and optionally request a prediction point. The form uses one column on phones, two on medium screens, and three on large screens.
Example Data Table
The sample below follows an upward-curving relationship. Load it into the form to test model fitting, diagnostics, prediction output, and exports.
| Observation | x | y |
|---|---|---|
| 1 | 0 | 3.2 |
| 2 | 1 | 4.9 |
| 3 | 2 | 8.1 |
| 4 | 3 | 13.2 |
| 5 | 4 | 19.8 |
| 6 | 5 | 28.4 |
| 7 | 6 | 39.1 |
| 8 | 7 | 51.7 |
Formula Used
Polynomial regression fits a curve of the form y = b₀ + b₁x + b₂x² + ... + bdxd. The calculator estimates coefficients by minimizing the sum of squared residuals between observed and predicted values.
Normal equation: (XᵀX)β = Xᵀy
Prediction: ŷ = Σ(bjxj)
Residual: eᵢ = yᵢ - ŷᵢ
R²: 1 - SSE / SST
RMSE: √(SSE / n)
Adjusted R²: 1 - (1 - R²)(n - 1) / (n - p)
Here, X is the design matrix, β is the coefficient vector, n is the number of observations, and p is the number of fitted parameters.
How to Use This Calculator
- Enter paired x and y observations using commas, spaces, or new lines.
- Select a polynomial degree from 1 through 6.
- Optionally enter an x value for prediction and derivative checks.
- Choose how many decimals you want displayed in results.
- Click Build Regression Model to calculate the equation and metrics.
- Review coefficient diagnostics, residuals, and accuracy measures above the form.
- Use the export buttons to save the results in CSV or PDF format.
- Prefer moderate degrees unless you have enough distinct data points.
Frequently Asked Questions
1. What does polynomial regression measure?
It models nonlinear relationships between x and y by fitting a polynomial curve. The fitted equation helps estimate trend shape, generate predictions, and compare model accuracy across degrees.
2. How do I choose the right degree?
Start with degree 2 or 3, then compare R², adjusted R², RMSE, and residual patterns. Higher degrees can overfit small datasets and create unstable coefficients.
3. Why must x and y counts match?
Each x value needs one paired y value. If counts differ, the model cannot align observations correctly, so regression metrics and coefficients would become invalid.
4. What does R² tell me here?
R² shows how much variation in y is explained by the fitted polynomial. Values closer to 1 usually indicate a stronger fit, but they should be checked alongside residual errors.
5. What is adjusted R² used for?
Adjusted R² penalizes unnecessary complexity. It helps compare models with different degrees by rewarding fit improvements only when they justify the added parameters.
6. Why are some standard errors unavailable?
Standard errors require remaining degrees of freedom after fitting parameters. If the dataset is too small relative to the chosen degree, those statistics cannot be estimated reliably.
7. Can I use this for forecasting?
Yes, but use caution when predicting far beyond the observed x range. Polynomial curves can bend sharply outside the sample and produce unrealistic extrapolations.
8. What do the derivative outputs mean?
The first derivative estimates local slope at the prediction x. The second derivative indicates curvature, helping you judge whether the fitted curve is bending upward or downward.