How to use the Derivative Calculator
- Pick the function from the list — powers, trigonometric, exponential, logarithmic or reciprocal.
- Enter the x value at which you want the rate of change.
- Read f′(x), the instantaneous slope of the curve at that point.
- Check f″(x) for concavity: positive curves upward, negative curves downward.
- Use the tangent line equation to approximate the function near that x.
How the calculation works
The derivative is the limit of the difference quotient as the interval shrinks to zero. Numerically, that limit is approximated with a central difference: evaluate the function a tiny step either side of the point and divide the change by twice the step. The central version is markedly more accurate than a one-sided difference because its leading error terms cancel, leaving an error proportional to h² rather than h.
Choosing the step size is a balancing act. Too large and the truncation error dominates — you are measuring the slope of a chord, not a tangent. Too small and floating-point cancellation dominates, because subtracting two nearly equal numbers destroys significant digits. A step near 10⁻⁵ sits close to the sweet spot for double-precision arithmetic on well-scaled functions, which is what this calculator uses.
The second derivative uses the standard three-point stencil and inherits more error, so treat it as indicative rather than exact. Its sign is what matters most: positive means the curve is concave up and any stationary point there is a minimum, negative means concave down and a maximum. Where the second derivative changes sign, the curve has an inflection point — the moment a growth curve stops accelerating and begins to level off.
f′(x) ≈ [f(x+h) − f(x−h)] / 2h; f″(x) ≈ [f(x+h) − 2f(x) + f(x−h)] / h², with h ≈ 10⁻⁵Source: Central difference formulas; see Burden & Faires, Numerical Analysis, Chapter 4.1.
Worked example
For f(x) = x², how fast is the area of a square changing when the side length reaches 3 units?
- Select x² and set x = 3.
- Central difference: [(3.00001)² − (2.99999)²] / 0.00002.
- Numerator: 9.00006 − 8.99994 = 0.00012.
- Divide: 0.00012 / 0.00002 = 6.000.
f′(3) = 6, matching the analytic derivative 2x exactly — area grows at 6 square units per unit of side length at that instant.
Frequently asked questions
Why not compute the derivative symbolically?+
Symbolic differentiation requires a full computer algebra system. A numeric derivative gives the same value at a point for any function you can evaluate, including ones with no tidy closed form.
What happens at a corner or a discontinuity?+
The two-sided estimate averages two different slopes and returns something meaningless. The absolute value function at zero is the classic example — no derivative exists there.
Why is my result 5.999999 instead of 6?+
Floating-point round-off in the difference quotient. Interpret it as 6; the error is at the eighth significant digit.
How do I find maxima and minima?+
Look for x values where f′(x) crosses zero, then check the sign of f″(x): negative indicates a maximum, positive a minimum.
Last reviewed August 31, 2026. We review this page whenever the underlying formula, tax year, published rate or standard changes.