Algebra & Calculus
Tabular Polynomial & Piecewise Linear Interpolation Calculator
Interpolate matching X/Y data and calculate the local slope at a selected coordinate.
How the calculation works
Polynomial mode uses barycentric Lagrange weights w(i)=1/product over j≠i of [x(i)−x(j)]. Away from a node, P(x)=[sum w(i)y(i)/(x−x(i))]/[sum w(i)/(x−x(i))]. Node values are returned directly, with the corresponding analytic derivative. Linear mode uses the adjacent segment slope and its line equation; end segments extend for extrapolation.
Worked example
Example inputs — Distinct sample X coordinates: 0 1 2; Corresponding Y values: 0 1 4; Query X coordinate: 1.5; Interpolation model: polynomial. Expected results — Interpolated or extrapolated Y: 2.25; Model derivative at query: 3 Y per X; Sample count: 3 points.
Assumptions and limits
Numerical educational calculation with finite real inputs. Rounding, ill-conditioning and the stated model domain can limit accuracy; this does not manipulate arbitrary symbolic expressions. One to thirty distinct sample coordinates are sorted with their matched values. This interpolates, rather than fitting noisy data by regression. Outside the sample span it extrapolates and can be unreliable. At a piecewise-linear interior knot, the slope is taken from its left segment. High-degree polynomials can oscillate or become ill-conditioned.
Reference and further reading
Read the underlying subject reference. Calculith is an independent implementation; the reference does not endorse or certify this tool.
Related calculators
- Quadratic & Linear Equation Roots Calculator
- Polynomial Value, Derivatives & Synthetic Division Calculator
- Unique Linear System & Residual Calculator
- Matrix Product, Transpose & Trace Calculator
- Complex Number Arithmetic & Polar Result Calculator
Example values are editable. Results are estimates where assumptions apply. Calculations run in your browser. Updated 2026-11-16.