HomeCalculatorsMathNumerical CalculusNumerical Interpolation Calculator
Math calculator

Numerical Interpolation Calculator

Piecewise-linear, Lagrange, or natural cubic spline of tabulated (x, y). Not regression, not CAS. Runs locally.

Instant result
Result
—

Enter values to calculate.

Inputs—
Mode—
Formula—
Trust summary CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance · all published methods
Input interpretation
Enter values to calculate.
Result
—
Verified scope
all published methods
Assurance
Core
Declared partition coverage
PASS · 9/9 declared partitions (ordinate-lagrange, linear, lagrange, spline, normalized-spline, node-identity, scaled-data, numerical-range, invalid-domain) · Matrix
Known limitations
  • Core CVP does not include live graph, viewport, or pointer interaction.
Model
y at x from tabulated points by piecewise linear, Lagrange, or natural cubic spline, with an engine-linked figure of the nodes and P(x).
Scope
The Result Card includes an engine-linked figure of the tabulated nodes and P(x) (query marker is published y; full sorted points are returned). The same primary engine is used by REST/MCP; curve samples are illustrative binary64 evaluations. Not Akima / PCHIP / regression / CAS.
Verification
Engine tested · Source checked · v1.1.6 · CVP VERIFIED · CVP protocol 1.0.0-proposed · Core assurance · all published methods· View Manifest · CVP overview · Specification
Versions
Calculation 1.1.6 · CVP protocol 1.0.0-proposed · Evidence 2026-10-28.metric-scope-v3
Verification revision
2026-10-28.metric-scope-v3 · 1/1 property · digest 540f8d62cb85
Legacy regression
13/13 tests · Production surface contract 6/6
Trust layers
Verification VERIFIED · Production CURRENT · Overall CVP state: VERIFIED under CVP 1.0.0-proposed
Reference
O1 model · O2 expected_values · O2 numerical_behavior
Interfaces
PASS · UI (SSR) / REST / MCP — ui-ssr is query-result HTML, not a live browser session. Error-path engine·REST·MCP 2/2 (status, code, calculation_version). SSR compared on URL-canonical requested calculations; empty query is idle (not an error) and JSON-typed object/array inputs are REST/MCP-only.
Supplemental domain review
Not performed
Named expert review
Not performed
CVP suite
286/286 golden · 8/8 CVP boundary · 25/25 invalid · 1/1 property · 2/2 metamorphic · 10/10 cross-interface · 1/1 cross-calculator · 6/6 CVP contract · Manifest
Sources
Sources
Evidence
4 legacy golden · 2 legacy boundary · legacy regression suite · 286/286 oracle-backed golden · 25/25 invalid · Artifact integrity PASS
This calculator CURRENT · Public schema 1.1.6 matches · Semantic contract ✓ · Production attested · Public/cache ✓ · Origin ✓
Semantic contract
PASS
Full verification

Manifest identity, reference classes, interfaces, suite, and production records.

Formulas

Core equations used by this calculator.

Lineary = y₀ + (y₁−y₀)(x−x₀)/(x₁−x₀)
Lagrangey = Σ yⱼ ℓⱼ(x), ℓⱼ = Πᵢ≠ⱼ (x−xᵢ)/(xⱼ−xᵢ)
Natural splineS″(x₀) = S″(xₙ) = 0
iPoints as x,y; x,y (semicolon-separated) or two-point x0,y0,x1,y1. Linear/spline table ≤ 100 points. Lagrange ≤ 9 points (degree ≤ 8). x outside the table needs extrapolate=true for linear and spline.

How to use

1

Enter tabulated points

At least two pairs with unique x. Linear is piecewise; Lagrange is one polynomial; spline is piecewise cubic. Discovery /spline-interpolation locks spline.

2

Evaluate at x

Linear and spline stay inside [x_min, x_max] unless extrapolate is on. Lagrange is defined everywhere. The figure shows the nodes, P(x), and the query.

Example calculations

Common configurations with formula and result.

ϟ

Midpoint

(0,0) and (10,20) at x=5

y = 0 + 20·5/10
10
ϟ

Natural spline

(0,0), (1,1), (2,0) at x=0.5

S″ ends = 0
0.6875

Numerical Interpolation calculator specification

Version 1.1.6 · Engine tested

Calculation status

Review policy · Evidence

Definition
Given tabulated points (xₖ, yₖ) with unique x, piecewise linear interpolates on the bracketing interval. Lagrange builds the unique polynomial of degree n−1 through n points. A natural cubic spline is piecewise cubic with S″=0 at the ends. Not statistical regression.
What it calculates
y at x from tabulated points by piecewise linear, Lagrange, or natural cubic spline, with an engine-linked figure of the nodes and P(x).
Inputs
  • method
  • x
  • points?
  • x0?
  • y0?
  • x1?
  • y1?
  • extrapolate?
Outputs
  • y
  • n
  • in_range
  • extrapolated
Formula
piecewise linear / Lagrange / natural cubic spline
Assumptions
  • The Result Card includes an engine-linked figure of the tabulated nodes and P(x) (query marker is published y; full sorted points are returned). The same primary engine is used by REST/MCP; curve samples are illustrative binary64 evaluations. Not Akima / PCHIP / regression / CAS.
  • Unique x; sorted internally
  • Natural spline ends, not clamped
  • Not Akima / PCHIP / regression / CAS
Units
  • dimensionless
Boundary conditions
  • Nonfinite table width or interpolated result → NUMERICAL_RANGE_ERROR
  • x outside table without extrapolate → VALUE_OUT_OF_RANGE
  • duplicate x → INVALID_INPUT
  • unknown method (including akima) → INVALID_MODE
Example
linear (0,0)(10,20) x=5 → 10
Validation cases

3 published on this page · 13/13 tests · Production surface contract 6/6 · View evidence

  • method=linear points=0,0;10,20 x=5 → y=10
  • method=spline points=0,0;1,1;2,0 x=0.5 → y=0.6875
  • method=akima points=0,0;1,1 x=0.5 → INVALID_MODE
Sources
  • ISO 80000-2:2019 Quantities and units — Mathematics
    Supports: Mathematical symbols and notation. This standard is not numerical verification or an endorsement of this implementation.
  • CRC Standard Mathematical Tables — Lagrange polynomial and natural cubic spline
    Supports: Lagrange ℓⱼ; natural cubic spline with S″=0 at the ends; piecewise linear lerp
  • NIST DLMF §3.3 — Interpolation — §3.3
    Supports: Polynomial interpolation, divided differences, and spline interpolation.
Calculation version
1.1.6

Background

Interpretation and common distinctions.

What does this numerical interpolation calculator compute?

Given tabulated points (xₖ, yₖ) with unique x, piecewise linear interpolates on the bracketing interval. Lagrange builds the unique polynomial of degree n−1 through n points. A natural cubic spline is piecewise cubic with S″=0 at the ends.

The published formula or method is piecewise linear / Lagrange / natural cubic spline. The following references support the stated mathematics or method:

Which inputs and limits should you check?

Inputs use finite decimal values (numbers or decimal text); hexadecimal, nonzero decimal underflow, incomplete/extra cells and conflicting aliases are rejected. Points accept pair text, arrays of exactly two cells, or objects with exactly x and y; scalar input requires all x0,y0,x1,y1. Equal aliases may coexist. Linear/spline allow 2–100 points; Lagrange allows 2–9. Defaults apply only to absent method/extrapolate; explicit empty fields remain invalid. Interpolation requires distinct node coordinates. Check the selected method and whether extrapolation is enabled; a curve through data is not statistical regression.

The worked example uses (0,0) and (10,20) at x=5 with y = 0 + 20·5/10. Compare it with the Example calculations and the complete result for the same inputs.

How can you verify and cite this result?

CalculatorX is responsible for this page. The mathematical references above explain the model; implementation checks and their scope are documented separately in the math.numerical.interpolate v1.1.6 Evidence and capability contract. Read the displayed verification and production state together with the specification's numerical limits.

Use the clean calculator URL to cite the tool. A shared input link identifies a particular calculation. Content updates, numerical verification, and domain reviews have separate dates and scopes.

Primary interpolation evaluates the supplied binary64 inputs using exact rational intermediates, then publishes 12 significant digits. Intermediate numerator/denominator sizes are bounded at 16384 bits; nonrepresentable results, nonzero result underflow and unsupported spline coordinate normalization return NUMERICAL_RANGE_ERROR. Exact arithmetic cannot remove data uncertainty, polynomial oscillation or extrapolation risk. Curve sampling uses binary64 formulas and may be unavailable at extreme scales.

Calculations run locally in this page. Shared input URLs may appear in server or third-party logs; avoid putting sensitive data into a shared link.

Frequently asked questions

Key distinctions behind the calculation.

Is this Akima, PCHIP, or regression?

No. Methods are piecewise linear, Lagrange, and natural cubic spline. Akima, PCHIP, clamped spline, and least-squares fit are out of scope. It is not a Statistics calculator.

Where does this run?

Locally in the browser by default. REST and MCP call the same interpolation engine. /spline-interpolation is a discovery URL, not a second engine.