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. Details about the mathematical background of this tool and boundary conditions can be found here.




See also

Linear interpolation · Quadratic interpolation · Polynomial interpolation

Additional information

Cubic spline interpolation is a mathematical method commonly used to construct new points within the boundaries of a set of known points. These new points are function values of an interpolation function (referred to as spline), which itself consists of multiple cubic piecewise polynomials. Read more

Source code

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


math interpolation cubic spline function points x y