Numerical Differentiation Calculator
The central difference averages the forward and backward slopes: sin x at x = 1 with h = 0.1 gives f′ ≈ 0.53940225217, close to cos 1 = 0.540302.
Use x, ^ for powers, and sin, cos, tan, exp, ln, log, sqrt, abs, pi, e. 2x and xsin(x) are understood.
0.53940225216976
Full answer, then cut to fewer decimals (not rounded):
- 0.53940225216976
- 0.5394022521697
- 0.539402252169
- 0.53940225216
- 0.5394022521
- 0.539402252
- 0.53940225
- 0.5394022
- 0.539402
- 0.53940
- 0.5394
- 0.539
- 0.53
- 0.5
- Forward difference [f(x+h) − f(x)]/h
- 0.4973637525
- Backward difference [f(x) − f(x−h)]/h
- 0.5814407518
- Second derivative [f(x+h) − 2f(x) + f(x−h)]/h²
- -0.8407699927
- Reference value (very small h)
- 0.5403023059
- Error of the central difference
- -0.0009001
- Error of the forward difference
- -0.04294
Step-by-step solution
- Central difference f′(x) ≈ [f(x + h) − f(x − h)] ÷ 2h (error ∝ h²)
- = [0.8912073601 − 0.7833269096] ÷ 0.2
- = 0.5394022522
Numerical Differentiation Formula
f′(x) ≈ [f(x + h) − f(x − h)] ÷ 2h
forward and backward differences have O(h) error; central O(h²)
Worked Example
f(x) = sin x at x = 1 with h = 0.1:
- Central difference f′(x) ≈ [f(x + h) − f(x − h)] ÷ 2h (error ∝ h²)
- = [0.8912073601 − 0.7833269096] ÷ 0.2
- = 0.5394022522
Backward difference [f(x) − f(x−h)]/h: 0.5814407518 · Second derivative [f(x+h) − 2f(x) + f(x−h)]/h²: -0.8407699927 · Reference value (very small h): 0.5403023059 · Error of the central difference: -0.0009001 · Error of the forward difference: -0.04294
GATE tip
GATE may give a table of values instead of f(x). Use the same formulas with the tabulated neighbours: f′(xᵢ) ≈ (yᵢ₊₁ − yᵢ₋₁)/2h.
More Numerical Methods Calculators
-
Newton-Raphson Method Calculator
xₙ₊₁ = xₙ − f(xₙ) ÷ f′(xₙ)
quadratic convergence near a simple root
Example: f(x) = x³ − 2x − 5 starting at x₀ = 2: Root x ≈ 2.09455148154.
-
Numerical Integration Calculator
Simpson: h/3 [y₀ + 4(y₁ + y₃ + …) + 2(y₂ + y₄ + …) + yₙ]
trapezoidal: h/2 [y₀ + 2(y₁ + … + yₙ₋₁) + yₙ]
Example: ∫₀¹ 1/(1 + x²) dx with n = 6: Simpson’s 1/3 rule ≈ 0.785397945234.
-
Bisection Method Calculator
c = (a + b)/2; regula falsi c = (a·f(b) − b·f(a)) ÷ (f(b) − f(a))
keep the half where f changes sign
Example: f(x) = x³ − x − 2 on [1, 2]: Root x ≈ 1.5213804245.
-
Secant Method Calculator
xₙ₊₁ = xₙ − f(xₙ)(xₙ − xₙ₋₁) ÷ (f(xₙ) − f(xₙ₋₁))
order of convergence ≈ 1.618
Example: f(x) = x² − 612 starting from 10 and 30: Root x ≈ 24.7386337537.
Frequently asked questions
Why is the central difference more accurate?
Its error terms of order h cancel, leaving an error proportional to h²; halving h cuts the error by about 4, against 2 for forward differences.
Can h be made as small as I like?
No. Below about 10⁻⁵ to 10⁻⁸ rounding error grows faster than truncation error falls, so very small h makes results worse.
Sources
Last reviewed: . Factors are stored exactly and computed with 50-digit decimal arithmetic. See how we verify conversion factors.
Cite this page
APA
Scientific Converters. (2026, October 15). Numerical Differentiation Calculator. Retrieved October 25, 2026, from https://scientificconverters.com/calculators/numerical-differentiation-calculator/
IEEE
Scientific Converters, "Numerical Differentiation Calculator," scientificconverters.com. Accessed: Oct. 25, 2026. [Online]. Available: https://scientificconverters.com/calculators/numerical-differentiation-calculator/