Cubic spline interpolation

This tools performs and visualizes a cubic spline interpolation for a given set of points.

Syntax for entering a set of points: Spaces separate x- and y-values of a point and a Newline distinguishes the next point. Hit the button Show example to see a demo.



By default, the algorithm calculates a "natural" spline: The boundary splines turn into a straight line (the second derivative is equal to zero in the end points).




See also

Linear interpolation · Quadratic interpolation · Polynomial interpolation

Additional information

In the mathematical field of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points. Read more

Source code

JavaScript source code (/cubic-spline-interpolation.js)


math interpolation cubic spline function points x y