Excel Splines based interpolation
This webpage - with demo file - presents user defined functions (VBA) for generating a cardinal spline1, cubic spline2, and monotone cubic spline3 - curves that run exactly through your data points - and that return interpolated points.If the graph of your data points is convex (or concave), then spline-based data interpolation will outperform linear interpolation, which will systematically overestimate (or underestimate) values between two consecutive data points.
- The cardinal spline has parameter tension, with a value between 0 and 1 (default 0.5). If set to 0, the spline reduces to straight lines between data points.
- The cubic spline typically yields a smoother overall curve than a cardinal spline, which may change direction more sharply near the data points, partly depending on its tension parameter.
- The monotone cubic spline’s advantage is that it avoids “wobbling” in the interpolated curve as it preserves monotonicity (see wikipedia). Monotonicity means a function moves in only one direction: it never increases then decreases (or never decreases then increases). Example below is clearly not monotone.
For interpolation within a 2-dimensional table, see Bilinear and spline based 2D-interpolation.