Hermite Interpolation Calculator

Enter function values and first derivatives at two to four distinct nodes to construct the unique Hermite polynomial. The result shows both forms of the polynomial, its value and slope at your chosen x, and the complete repeated-node table.

Your numbers
Choose how many distinct x-values have known function values and first derivatives.
Enter node 0's distinct x-value.
Enter the known function value at node x0.
Enter the known first derivative at node x0.
Enter node 1's distinct x-value.
Enter the known function value at node x1.
Enter the known first derivative at node x1.
Enter node 2's distinct x-value.
Enter the known function value at node x2.
Enter the known first derivative at node x2.
Enter node 3's distinct x-value.
Enter the known function value at node x3.
Enter the known first derivative at node x3.
Enter the x-value where the interpolating polynomial should be evaluated.
Enter a bound M on the absolute 2N-th derivative, or leave zero when it is unknown.

What this calculator leaves out

  • The error bound is valid only when the entered M truly bounds the absolute 2N-th derivative over an interval containing all selected nodes and the evaluation point.
  • A small constraint residual checks the numerical construction but does not show that the polynomial accurately represents an unknown function between nodes.
  • A single high-degree Hermite polynomial can oscillate or extrapolate poorly even while matching every supplied value and slope.

By using this calculator you agree to the Terms of Use. Results are estimates, not professional advice.

H(x) at x = 0.5-0.13

H′(x) at x = 0.5
-0.25
Polynomial degree
3
Hermite polynomial in Newton form
H(x) = 0 + 0 × (x − 0) + 0 × (x − 0) × (x − 0) + 1 × (x − 0) × (x − 0) × (x − 1)
Hermite polynomial in standard form
H(x) = x^3 − x^2
Maximum constraint residual
0
Error bound at the evaluation point
A positive maximum 2N-th derivative is required.
Repeated-node divided-difference table
zD0D1D2D3
00
000
1000
10111

Enter a positive maximum 2N-th derivative to calculate a numeric interpolation error bound.

How to use this calculator

  1. Choose the number of distinct nodes for which you know both a function value and a first derivative.
  2. Enter each node x-value, function value, and slope, keeping every selected x-value distinct.
  3. Enter the x-value where you want to evaluate the polynomial; values outside the node interval are extrapolations.
  4. Optionally enter a verified bound on the absolute 2N-th derivative to obtain the interpolation error bound.
  5. Review the constraint residual and divided-difference table before relying on an expanded polynomial.

How Hermite interpolation is calculated

Hermite interpolation fits a single polynomial to both a value and a first derivative at every selected node. With N nodes, those are 2N conditions, so there is one polynomial of degree at most 2N − 1 that satisfies them. Two nodes make a cubic, three make a quintic, and four make a degree-seven polynomial.

The calculator uses the repeated-node divided-difference construction. It lists each input node twice: z₂ᵢ = z₂ᵢ₊₁ = xᵢ. The ordinary divided difference for two equal entries would divide by zero, so the supplied slope is used instead: D₂ᵢ₊₁,₁ = f′(xᵢ). Every other entry follows Dⱼ,ₖ = (Dⱼ,ₖ₋₁ − Dⱼ₋₁,ₖ₋₁) ÷ (zⱼ − zⱼ₋ₖ).

Reading the diagonal gives the Newton form:

H(x) = Σₖ₌₀²ᴺ⁻¹ Dₖ,ₖ ∏ᵣ₌₀ᵏ⁻¹ (x − zᵣ)

The empty product is one. The tool expands that form into powers of x, then uses the unrounded coefficients to evaluate both H(x) and H′(x). It also substitutes every node back into the polynomial and its derivative. The largest mismatch is the maximum constraint residual; a small result is a construction check, not evidence that the polynomial models an unknown function between nodes.

What moves the result most

Changing a value fixes the curve's height at that node, while changing a slope changes how the curve enters and leaves it. Adding a node adds two more constraints and can substantially change the polynomial everywhere, especially near an endpoint. Very close nodes can make divided differences and expanded coefficients large; the Newton form is usually the better numerical description in that case.

If you provide a positive bound M on the absolute 2N-th derivative over an interval containing every node and the evaluation point, the conditional error estimate is |f(x) − H(x)| ≤ M × ∏ᵢ |x − xᵢ|² ÷ (2N)!. It is exactly zero at an entered node. The calculator cannot determine whether an entered M is valid.

What this calculator leaves out

This tool accepts only first derivatives and at most four distinct nodes. It does not estimate derivatives from noisy measurements, choose nodes, establish an error bound, or decide whether one global high-degree polynomial is appropriate. It does not replace a piecewise Hermite spline, regression model, or physical model when data are noisy, wide-ranging, or used for extrapolation.

Worked example

For f(0) = 0, f′(0) = 0, f(1) = 0, and f′(1) = 1, the repeated nodes are 0, 0, 1, 1. The diagonal coefficients are 0, 0, 0, 1, so the Newton form is H(x) = x²(x − 1), or x³ − x².

At x = 0.5, the calculator returns H(0.5) = −0.125 and H′(0.5) = −0.25. The values and slopes at both nodes are recovered exactly in exact arithmetic, and the residual shown by floating-point arithmetic is near zero.

Common questions

What is Hermite interpolation?

Hermite interpolation is polynomial interpolation that matches derivative information as well as function values. This calculator uses one value and one first derivative at each node, producing a polynomial of degree at most two times the node count minus one. That is more constrained than ordinary value-only interpolation.

Why does each node appear twice in the divided-difference table?

Repeating a node is the divided-difference way to include derivative information. The divided difference of two copies of the same node is defined by its limiting value, which is the supplied first derivative. The remaining table entries can then be computed with the usual divided-difference recurrence.

How is Hermite interpolation different from Lagrange interpolation?

Lagrange interpolation uses function values only, so N nodes normally determine a degree at most N minus one polynomial. First-order Hermite interpolation also uses a slope at every node, giving twice as many conditions and degree at most 2N minus one. Hermite interpolation can therefore match the local direction of the data as well as its height.

How is a Hermite polynomial different from a cubic Hermite spline?

This calculator builds one polynomial over all selected nodes. A cubic Hermite spline uses a separate cubic on each interval and usually chooses or supplies slopes so neighboring pieces join smoothly. Splines are often more stable for many nodes because a change is local rather than global.

Can I evaluate the polynomial outside the interpolation nodes?

Yes, but that is extrapolation, so the result can move quickly away from the behavior suggested by the input data. The calculator labels an outside evaluation point as extrapolation. An error bound still needs a valid derivative bound over an interval that includes that point.

Why can closely spaced nodes produce unstable coefficients?

Divided differences divide changes in the data by differences between node positions. Very small separations can magnify rounding and measurement error, then produce large coefficients that cancel in the expanded polynomial. The supplied constraints may still be met, but evaluating or interpreting the standard form can become unreliable.

Put this calculator on your site

Paste the snippet below where you want the calculator to appear. It stays up to date automatically and links back here.

<iframe src="https://countfolk.com/embed/hermite-interpolation-calculator/" title="Hermite Interpolation Calculator" width="100%" height="640" style="border:0;max-width:44rem" loading="lazy"></iframe>