Scientific Converters Precise unit conversions for science & engineering.

    Loading…

    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.

    Central difference f′(x) ≈

    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
    1. Central difference f′(x) ≈ [f(x + h) − f(x − h)] ÷ 2h (error ∝ h²)
    2. = [0.8912073601 − 0.7833269096] ÷ 0.2
    3. = 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:

    1. Central difference f′(x) ≈ [f(x + h) − f(x − h)] ÷ 2h (error ∝ h²)
    2. = [0.8912073601 − 0.7833269096] ÷ 0.2
    3. = 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

    All GATE Engineering Mathematics calculators →

    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/

    Send feedback

    Found a wrong value, a missing unit or an idea? Tell us. We read every message.

    What is it about?

    We store your message, the page you were on and your email if given. See the privacy policy.