Find the numerical derivative f'(x) of any function at a point, using the central difference formula with full step-by-step work.
Enter a function and a point x₀ to estimate the derivative there
This derivative calculator finds the numerical derivative f'(x) of any function at a single point using the central difference formula — the same approach a computer uses when an exact symbolic answer isn't available or isn't needed. Rather than applying algebraic rules like the power rule or chain rule to produce a formula, it evaluates your function at two points very close to x₀ and estimates the slope of the tangent line from those values. This makes it a fast way to check a hand-worked derivative, explore instantaneous rate of change for physics and economics problems, or simply see what a derivative looks like in action without a full computer algebra system.
It computes f'(x₀) — an approximation of the instantaneous rate of change of f(x) at the exact point x₀ — using the central difference formula f'(x₀) ≈ (f(x₀+h) − f(x₀−h)) ÷ (2h). It does not produce a symbolic expression like "2x" or "cos(x)"; it returns a single numeric slope value at the point you specify, along with two step-size estimates so you can confirm they agree.
Calculus students checking homework, engineers and physics students who need an instantaneous rate of change at a specific input, economics students computing marginal cost or marginal revenue at a given quantity, and anyone studying numerical methods who wants to see the central difference formula applied directly. It's equally useful for double-checking a symbolic derivative you worked out by hand.
Not every function can be differentiated symbolically in closed form, and even when it can, evaluating the derivative numerically at a point is often faster and simpler than deriving and simplifying a full formula. Numerical differentiation is also the technique used inside many real optimization algorithms, simulations, and engineering tools when an analytic derivative isn't available or practical to compute.
Physicists use numerical derivatives to estimate velocity from discrete position measurements. Engineers analyze the rate of change of a sensor signal at a specific instant. Economists evaluate marginal cost or marginal revenue functions at a target output level. Machine learning systems rely on the same finite-difference idea to sanity-check symbolic gradients used in optimization.
How this numerical derivative calculator turns two nearby function values into a slope estimate
Unlike a one-sided difference, the central difference formula samples f(x) on both sides of x₀, which cancels the first-order error term and roughly squares the accuracy for the same step size.
The calculator always shows two estimates — at h=0.00001 and h=0.0001. If they closely agree, that's strong evidence the numerical result has converged to the true slope.
The result is a single number describing the slope at one x₀ — it is not an algebraic expression like 2x, and it must be recalculated at every new point.
From entering a function to confirming your result converged
Type an expression in x using + − * / ^, parentheses, and supported functions like sin(x), cos(x), sqrt(x), exp(x), ln(x), log(x), and abs(x) — for example x^2 + sin(x).
Type the numeric value where you want the derivative evaluated. Avoid points where the function is undefined.
The calculator applies the central difference formula twice, once with h=0.00001 and once with h=0.0001.
The main result and the two individual step-size results are displayed side by side.
If the h=0.00001 and h=0.0001 estimates agree closely, the numerical derivative is reliable for that point.
For simple functions like x², compare the numerical result to the exact symbolic derivative (2x) at the same point.
f(x) = x² at x₀ = 3 — a function with a known, easily verified exact derivative
Find the numerical derivative of f(x) = x² at x₀ = 3 using h = 0.00001, and compare it against the exact symbolic derivative 2x.
Explanation: Because x² has a simple, well-known exact derivative (2x), this example makes it easy to see that the central difference formula's numerical output (6.000000) matches the true calculus answer (6) almost exactly. For functions without a simple closed-form derivative, this same process still works — you just won't have an independent exact answer to compare against, which is where the two-step-size convergence check becomes especially useful.
What the numbers in your result actually represent
| Output | What It Means | Example Reading |
|---|---|---|
| f'(x₀) value | The slope of the tangent line to y=f(x) at x=x₀; the instantaneous rate of change there | f'(3)=6 means the curve rises about 6 units for every 1-unit increase in x at that exact point |
| h=0.00001 vs h=0.0001 | Two independent estimates at different step sizes; agreement signals convergence and reliability | 6.000000 vs 6.000000 → strong agreement, trust the result |
| Sign of f'(x₀) | Positive means increasing at x₀; negative means decreasing; near zero suggests a possible max/min | f'(x₀) = −2.5 → the function is decreasing at that point |
| Error / undefined result | The function could not be evaluated near x₀ — often a discontinuity or domain restriction | 1/x at x₀=0 fails because x=0 is outside the domain |
Manual verification: for simple functions with a known symbolic derivative (like polynomials, sin(x), or exp(x)), plug x₀ into the exact formula and compare — a close match (typically 5-6 decimal places) confirms the numerical estimate is trustworthy. For more complex functions, the fastest check is comparing the h=0.00001 and h=0.0001 results to each other rather than to an external formula.
Where a fast, numerical instantaneous rate of change is genuinely useful
Verify a hand-worked derivative at a specific test point before submitting homework.
Quickly check calculus practice problems for entrance exams and standardized tests.
Differentiate a position function to estimate instantaneous velocity at a moment in time.
Differentiate a velocity function to estimate instantaneous acceleration.
Estimate the slope of a signal, stress curve, or system response at a specific input.
Evaluate the derivative of a cost or revenue function at a target production level.
Build intuition for the finite-difference gradients used to check optimization algorithms.
Understand the numerical methods behind physics engines, graphics, and simulation code.
Locate candidate maxima or minima by testing where the derivative is near zero.
Estimate a reaction rate as the derivative of concentration with respect to time.
Explore how a pricing model's output changes with respect to a single input variable.
Show students how a numerical estimate approaches the true calculus derivative as h shrinks.
A fast sanity check for symbolic differentiation results at one or more specific points.
What this numerical derivative calculator does well, and where it can't replace a computer algebra system
Three ways to numerically approximate a derivative
| Method | Formula | Accuracy |
|---|---|---|
| Forward difference | f'(x) ≈ (f(x+h) − f(x)) ÷ h | O(h) — uses only the right-side value; less accurate for a given h |
| Backward difference | f'(x) ≈ (f(x) − f(x−h)) ÷ h | O(h) — uses only the left-side value; less accurate for a given h |
| Central difference (used here) | f'(x) ≈ (f(x+h) − f(x−h)) ÷ (2h) | O(h²) — averages both sides, cancelling first-order error for higher accuracy |
Summary: This derivative calculator gives you an instant numerical estimate of f'(x₀) using the central difference formula, with a built-in convergence check across two step sizes. Pair it with the Integral Calculator and Limit Calculator to cover differentiation, integration, and limits — the three pillars of first-semester calculus — all computed numerically right in your browser.
Common questions about numerical derivatives
Trusted educational references to go deeper on differential calculus
Explore other math tools