Curve Fitting Calculator

Choose a curve type and enter the x and y values of your points.

Numbers separated by commas.

The same number of numbers as the x values.

Try

Result

You entered3 points\text{3 points}

y=3x2\displaystyle y = 3x^{2}

R²

R2≈1\displaystyle R^2 \approx 1
Show the work
  1. Least-squares power fit

    Taking natural logarithms turns y=axby = a x^{b} into ln⁡y=ln⁡a+bln⁡x\ln y = \ln a + b \ln x, a straight line in ln⁡x\ln x and ln⁡y\ln y. The fit is a least-squares line through the logs.

  2. Slope and intercept of the straight line

    Here uu is ln⁡x\ln x and ww is ln⁡y\ln y; the line is w=c+buw = c + b u through the point of means.

    Using b=∑(u−uˉ)(w−wˉ)∑(u−uˉ)2b = \dfrac{\sum (u - \bar{u})(w - \bar{w})}{\sum (u - \bar{u})^2}

    b=2, c=1.098612, a=ec=3b = 2,\ c = 1.098612,\ a = e^{c} = 3
  3. Coefficient of determination

    R2R^2 compares the squared gaps between the actual yy values and the curve with the spread of yy about its mean; 11 means a perfect fit.

    Using R2=1−SSresSStotR^2 = 1 - \dfrac{SS_{res}}{SS_{tot}}

    R2≈1R^2 \approx 1
  4. Result

    The best power fit is y=3x2y = 3x^{2}.

Worked examples