Numerical Derivative Calculator

Compute approximate derivatives at a point using forward, backward, and central finite difference formulas with adjustable step size h.

Function Input

Supports: +, -, *, /, ^, sin, cos, tan, log, exp, sqrt, abs, PI, E

Formulas

Fwd: [f(x+h) − f(x)] / h
Bwd: [f(x) − f(x−h)] / h
Ctr: [f(x+h) − f(x−h)] / (2h)

Enter a function and click Calculate

Summary

Compute approximate derivatives at a point using forward, backward, and central finite difference formulas with adjustable step size h.

How it works

  1. The tool parses the function expression entered by the user into a safe JavaScript evaluator.
  2. It computes f(x), f(x+h), and f(x−h) using the given point and step size.
  3. Forward difference: [f(x+h) − f(x)] / h approximates f'(x) with O(h) error.
  4. Backward difference: [f(x) − f(x−h)] / h also has O(h) error.
  5. Central difference: [f(x+h) − f(x−h)] / (2h) is more accurate with O(h²) error.
  6. Results are displayed with up to 10 significant digits for comparison.

Use cases

  • Verify analytical derivatives by comparing with numerical estimates.
  • Approximate derivatives of functions that are difficult to differentiate by hand.
  • Study the effect of step size on finite difference accuracy.
  • Learn and teach numerical differentiation methods in calculus courses.
  • Quick sanity-check during scientific computing or engineering work.
  • Explore error behavior (truncation vs. round-off) as h varies.

Frequently Asked Questions

Last updated: 2026-06-13 · Reviewed by Nham Vu