Skip to content
ENExplore Calculators

Numerical Differentiation Calculator

Work out numerical differentiation instantly with clear inputs, formula shown and shareable results.

About Numerical Differentiation Calculator

The forward difference has error of order h, while the central difference cancels the leading error term and achieves order h². The second derivative uses the symmetric three-point stencil.

Formulas

Central difference

f'(x) ≈ [f(x + h) − f(x − h)] / (2h), error O(h²)

Second derivative

f''(x) ≈ [f(x + h) − 2f(x) + f(x − h)] / h²

Worked example

With the default values below, Numerical Differentiation Calculator returns Central difference estimate of 12.0001000000. Change any input above and every figure here is recalculated in your browser.

Inputs used

Polynomial coefficients, highest power first
1, 0, 0, 0
Differentiate at x =
2
Step size hminimum 0
0.01

Results

Central difference estimate
12.0001000000
Forward difference estimate
12.0601000000
Exact derivative
12.0000000000
Second derivative estimate
12.00000000

Step by step

  1. 1Values used
  2. 2Central difference
  3. 3Second derivative
  4. 4Central difference estimate= 12.0001000000
  5. 5Forward difference estimate= 12.0601000000
  6. 6Exact derivative= 12.0000000000
  7. 7Second derivative estimate= 12.00000000

Assumptions and limits

  • The result is derived only from the 3 inputs listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to 10 decimal places, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

Differentiate x³ at x = 2 with h = 0.01?

The central difference gives 12.0001 against the exact 12, while the forward difference gives 12.0601.

Why not make h tiny?

Subtracting nearly equal values loses precision, so very small h amplifies rounding error. There is an optimal middle ground.

Numerical Differentiation Calculator | Calcrivo