Calculus · Concept

Numerical Differentiation Explained

What the d/dx key really does, the simple formula behind it, and the two situations where a numerical derivative can quietly mislead you.

fx-991ES Web TeamUpdated 23 June 20267 min read

When you use a derivative calculator like ours, it isn't doing the algebra you learned in class. It's doing numerical differentiation: estimating the slope of a curve at one point by sampling the function nearby. Understanding that is the difference between trusting your answer and being fooled by it.

On this page

  1. What d/dx returns
  2. How it works: the central difference
  3. Worked examples
  4. Numerical vs symbolic
  5. Two pitfalls
  6. FAQ

What d/dx returns

The syntax is d/dx(f(x), a). It returns one number: the instantaneous rate of change of f at x = a — geometrically, the slope of the tangent line to the curve at that point. It does not return a derivative function like 3x². If you want the slope at three different points, you run it three times.

How it works: the central difference

The derivative is defined as a limit of the difference quotient. A numerical engine can't take a true limit, so it picks a very small step h and uses the symmetric (central) difference:

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

Sampling on both sides of a (rather than just one) cancels the leading error term, so for smooth functions the estimate is accurate to many decimal places. This is why a well-behaved case like the derivative of x³ comes back essentially exact.

Worked examples

Power rule

d/dx(x^3, 2)12. Symbolically (x³)′ = 3x², and 3·2² = 12. ✔

Linear slope

d/dx(x^2, 5)10. (x²)′ = 2x, so 2·5 = 10.

Trig (Rad mode)

d/dx(sin(x), 0)1. (sin x)′ = cos x, cos 0 = 1.

Exponential

d/dx(e^(x), 0)1. (eˣ)′ = eˣ, and e⁰ = 1.

Logarithm

d/dx(ln(x), 1)1. (ln x)′ = 1/x, 1/1 = 1.

Numerical vs symbolic

SymbolicNumerical (this tool)
ReturnsA formula, e.g. 3x²A number at one point, e.g. 12
ExactnessExactEstimate (usually many correct digits)
Needs a point?NoYes — you supply x = a
SpeedCan be slow / complexInstant

For most homework checking and engineering work, the numerical value is exactly what you want. To see how the same engine handles integration, read the pillar guide on integration & derivatives.

Two pitfalls

1 · Corners and kinks

At a non-differentiable point the answer is meaningless. For |x| at x = 0 the true derivative doesn't exist, yet the symmetric formula returns 0 because the left and right samples are equal. Always confirm the function is smooth at the point.

2 · Degree mode for trig

(sin x)′ = cos x only in radians. In Deg mode the derivative is scaled by π/180 and your answer will be wrong. Switch to Rad first.

Rounding

A result like 11.99999999 is the numerical estimate of 12 — round it. This is expected behaviour, not an error.

Frequently asked questions

What does d/dx(f(x), a) return?

The slope of f at the single point x = a. For example d/dx(x^3, 2) returns 12.

How does numerical differentiation work?

Via a central difference: f'(a) ≈ [f(a+h) − f(a−h)] / (2h) for a very small h.

Why is my derivative slightly off, like 2.0000001?

It's a numerical estimate, not a symbolic result. Tiny end-digit rounding is normal — round sensibly.

Can it differentiate a function with a corner?

Be careful: at points like |x| at x = 0 the derivative doesn't exist, but the formula may still return 0.

See it for yourself

Open the calculator, switch to Rad mode, and try d/dx(sin(x), 0).

Open the derivative calculator →