What Is Curve Fit?
Curve fitting finds a function that follows the pattern in your data. Because the best model is rarely obvious, this tool fits several curves at once and shows them in one ranked table.
Enter your points to see the highest-R² curve with its equation, the adjusted R² and RMSE of every model, and a prediction for any x you choose. A chart of the data and curve and a bar chart of R² by model help you judge the fit.
The sections below explain R², why a higher degree can overfit and how to choose a sensible model.
How to Use the Curve Fit Calculator
- Enter x and y values in matching order.
- Optionally enter an x to predict.
- Read the ranked model table.
- Check the curve against the points.
Curve Fit Formula
R²
Adjusted R²
Curve Fit Variables Explained
| Symbol | Meaning | Notes |
|---|---|---|
| x, y | Your data points | |
| R² | Share of variation explained | |
| Adjusted R² | R² corrected for the number of parameters | |
| RMSE | Typical size of the residuals |
Curve Fit Worked Example
Values that roughly multiply by 1.65 at each step, such as 3.1, 5.2, 8.9, 14.8, 24.5, are growing exponentially. The exponential model ranks first with R² close to 1, while a straight line fits poorly.
With the example values loaded in the calculator above, the steps are:
- Fit each model to the 8 points by least squares.
- Exponential, power and logarithmic models are fitted by taking logarithms and fitting a straight line.
- Rank by R². Exponential is highest with R² = 0.999745.
- R² always rises with more parameters, so also compare adjusted R² and look at the plot.
Result: Highest R²: Exponential = y = 1.8823·e^(0.51251x); R² of that model = 0.999745; Prediction at x = 9 = 189.622.
Where Curve Fit Is Used
Lab data
Find the relationship between two measurements.
Growth trends
Test for exponential growth.
Forecasting
Predict a value at a new x.
Model comparison
See which curve family suits the data.
Common Curve Fit Mistakes to Avoid
- Look at the scatter plot first.
- Do not extrapolate far beyond the data.
- Exponential and power fits need positive y.
Curve Fit Terms and Definitions
- Residual
- The difference between an observed y and the curve’s y.
Curve Fit FAQs
How do I fit a curve to data points?
Choose a model, then find the parameters that minimise the squared distance to the points, which is what this tool does for several models at once.
Which curve is the best fit?
The one with a high R² that is also simple and sensible for the process behind the data.
Why does R² rise with a higher degree?
More parameters can always follow the points more closely, so use adjusted R².
Can I predict with the curve?
Yes, enter an x. Predictions inside the data range are safer than those outside it.