Derivative at a Point
Enter a function of x and a point a. The calculator estimates the derivative f'(a) with a symmetric central-difference formula, which works for any expression including trigonometric, exponential and rational functions.
A slope without a symbolic rule
The derivative of a function at a point is the slope of the curve there — how fast the output changes for a small change in the input. Symbolically it is found by applying differentiation rules; numerically it can be estimated by measuring the function on either side of the point and taking the rise over the run.
This calculator does the second. It evaluates the function just above and just below your chosen point and returns the slope between those two samples, which works for any expression you can type without needing a symbolic rule for it.
Numeric differentiation earns its place when the symbolic route is awkward: a function assembled from several nested pieces, or one where a number is wanted rather than an expression. You get f′(a) directly, without producing f′(x) first.
It is also the natural way to check symbolic work. If you have differentiated by hand and want confirmation at a particular point, this gives an estimate computed by a completely different mechanism.
How to use this calculator
- Type the function in terms of x Standard notation: ^ for powers, * for multiplication, and named functions such as sin, cos, exp, ln and sqrt. Multiplication must be explicit: x*sin(x), not x sin(x).
- Enter the point a Any finite number. The function must be defined on both sides of it, since the method samples slightly above and below rather than at the point.
- Check the reported f(a) The value of the function at the point is shown alongside the derivative. It is a quick confirmation that the expression was parsed as you intended before you read the slope.
- Read the derivative as an approximation The answer is marked with ≈. It is accurate to several significant figures for smooth functions, but it is a measurement rather than an exact symbolic value.
How the slope is estimated
The implementation uses a symmetric central difference: it computes f(a + h) and f(a − h) for a small step h, then divides their difference by 2h. Sampling on both sides rather than only forwards makes the errors above and below the point cancel to first order, which is why the central difference is markedly more accurate than the one-sided version for the same step size.
The step is not a fixed constant. It is scaled to the point, taken as h = 10⁻⁶ × (|a| + 1), so a derivative at x = 1000 uses a proportionally larger step than one at x = 0.001. That scaling matters: a step that is fine near the origin would be lost in floating-point rounding at large values of a, where consecutive representable numbers are further apart.
The result is then snapped to remove floating-point noise before display, which is why a derivative that should be exactly 1 comes back as 1 rather than 0.9999999998.
What each input means
- f(x) Function — form field “Function f(x)”
- The expression to differentiate, in terms of x. It is parsed once and then evaluated at two nearby points, so it must be defined and finite in a small neighbourhood of a.
- a Point of evaluation — form field “Point a”
- Where the slope is measured. Any finite real number, including negatives. It also sets the step size, since h scales with |a|.
- h Step size
- Not entered — computed internally as 10⁻⁶ × (|a| + 1). It is small enough to approximate the limit and large enough to avoid cancellation error in the subtraction.
Worked examples
Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.
A product of two functions
Differentiate sin(x)·x² at x = 1. By hand this needs the product rule combined with the derivatives of sine and of a power, so it is a good test of whether the numeric estimate matches careful symbolic work.
Inputs Function f(x) = sin(x) * x^2, Point a = 1
- Function f(x) = sin(x) * x^2
- Point a = 1, f(a) = 0.841471
- Central difference f'(a) ≈ (f(a+h) − f(a−h)) / 2h with a small h
- Derivative f'(1) ≈ 2.22324
Result f'(1) ≈ 2.22324
The product rule gives f′(x) = cos(x)·x² + 2x·sin(x), which at x = 1 is cos(1) + 2·sin(1). The numeric estimate agrees to the displayed precision, confirming both the rule application and the arithmetic.
The tool never produces that symbolic expression, though. It measures the slope at one point, which is enough when a number is wanted and not enough when f′(x) is.
A rational function away from its singularity
Differentiate 1/x at x = 2. The exact derivative is −1/x², so the answer should be −0.25 — and the sign is the interesting part.
Inputs Function f(x) = 1 / x, Point a = 2
- Function f(x) = 1 / x
- Point a = 2, f(a) = 0.5
- Central difference f'(a) ≈ (f(a+h) − f(a−h)) / 2h with a small h
- Derivative f'(2) ≈ -0.25
Result f'(2) ≈ -0.25
The negative result reflects a decreasing function: as x grows, 1/x falls. A numeric derivative carries sign information exactly as a symbolic one does, since it is simply a rise over a run.
Evaluating at x = 0 instead would be meaningless: the function is undefined there and the samples on either side diverge in opposite directions. The method gives no warning, so checking that the function is defined near the point is your responsibility.
Reading the result
What the number means geometrically
It is the slope of the tangent line at that point: positive where the function is rising, negative where it is falling, near zero at a turning point. A value of 2 means the output changes about twice as fast as the input nearby.
How much precision to expect
For smooth functions the estimate is typically good to several significant figures. It is not exact, and the ≈ marking is honest: the method trades a small approximation error for the ability to handle any expression.
Where the estimate fails rather than degrades
At a corner, a jump or a vertical asymptote the derivative does not exist, but the formula still returns a number by joining two points across the discontinuity. Such a result is meaningless rather than imprecise, and nothing in the output flags it.
When you would use this
Checking a hand-differentiated result
Substitute your point into your own f′(x) and compare. A mismatch localises the error immediately, and because the numeric method shares no machinery with symbolic differentiation, the two are genuinely independent.
Rates of change from a modelled quantity
Where a function models position, cost or concentration, the derivative at a point is the instantaneous velocity, marginal cost or reaction rate at that moment. The number is often the answer required, with no expression needed.
Assumptions and limitations
What this calculator assumes
- The function is defined and finite on both sides of the point, within a step of about 10⁻⁶ × (|a| + 1).
- The function is differentiable there; the formula returns a value regardless.
- Results are displayed to six significant figures after floating-point noise has been removed.
Where it stops being the right tool
- Numeric only: no symbolic derivative f′(x) is produced, so this cannot show working for an algebraic question.
- First derivative only, at one point, in one variable: higher derivatives and partial derivatives are out of scope.
- No detection of non-differentiable points. At a corner or an asymptote a plausible-looking number is returned anyway.
Common mistakes
Evaluating at a point where the function is undefined
Why it happens. The expression looks fine and the tool returns a number, so nothing signals a problem. For 1/x at x = 0 the two samples straddle the asymptote and their difference is meaningless.
How to avoid it. Check the reported f(a) first. If it is missing, infinite or absurdly large, the point is outside the domain and the derivative below it should be discarded.
Expecting a symbolic answer
Why it happens. The page is titled as a derivative calculator, and most derivative questions ask for an expression, so a single number reads as an incomplete answer.
How to avoid it. Use this when you want f′ at a specific point. For f′(x) as an expression, the symbolic derivative calculator is the right tool.
Reading the last displayed digit as exact
Why it happens. Six significant figures look authoritative, and the noise-removal step makes clean values such as 1 or −0.25 look exact even though they were estimated.
How to avoid it. Treat the final digit as uncertain. Where an exact value matters, differentiate symbolically and use this only as a cross-check.
Key terms
Frequently asked questions
How accurate is the result?
For smooth functions, typically several significant figures. The central-difference formula cancels first-order error by sampling both sides of the point, and the step size scales with the point so that precision holds for both very small and very large values of a.
Which functions can I enter?
Any expression in x built from +, −, *, / and ^ together with named functions including sqrt, sin, cos, tan, ln, log and exp. Multiplication must be written explicitly.
Why is the answer marked approximate?
Because it is measured rather than derived. The method computes a slope between two nearby points instead of applying differentiation rules, so it is close to the true derivative but never exactly equal to it.
Can it find a second derivative?
No. Only the first derivative is computed. Estimating a second derivative numerically needs a different formula and is far more sensitive to rounding.