Derivative Calculator

The derivative of a function f(x) with respect to x is denoted as f'(x) or dy/dx and is computed using differentiation rules. The process involves finding the limit of the difference quotient as the change in x approaches zero.

Loading...

Please wait... loading-icon

How fast is something changing right now — not on average over the last hour, but at this exact instant? That is the question the derivative answers. It gives the slope of a function's curve at any point, which translates directly into velocity from position, marginal cost from a cost curve, or the growth rate of a population. The derivative calculator differentiates a function you supply and returns the derivative, applying the standard rules of differentiation accurately so you can check your own working, explore how the slope behaves, or skip straight to the result a larger problem needs.

Quick Answer

The derivative is defined by f′(x) = lim (h→0) of [f(x + h) − f(x)] / h, and in practice it is computed with rules — chief among them the power rule: the derivative of x^n is n·x^(n−1). For example, the derivative of 3x² + 2x − 5 is 6x + 2.

The Derivative Is a Rate of Change

Start with the average rate of change between two points on a curve: rise over run, the slope of the straight line joining them. Now slide the second point closer and closer to the first. The line pivots toward the tangent at that point, and its slope approaches a limiting value — the derivative at that point. That is why the definition is a limit: the derivative is what average rates of change converge to when the interval shrinks to nothing.

The output is itself a function. Feed in x and f′(x) tells you the slope at that x: positive where the original function climbs, negative where it falls, zero at peaks, troughs and flat spots. Two notations dominate — Lagrange's f′(x) and Leibniz's dy/dx, the second of which usefully behaves almost like a fraction, a hint that powers the chain rule. In applied work the units speak plainly: metres per second for a moving object, dollars per unit for a manufacturer, degrees per hour for a cooling liquid.

How to Use the Derivative Calculator

  1. Enter the function in terms of x, using ^ for powers (write x^3, not x3) and explicit multiplication where needed.
  2. Use standard names for functions: sin(x), cos(x), ln(x), e^x or exp(x) as the tool expects.
  3. Run the calculation and read the derivative as a function of x.
  4. To find the slope at a specific point, substitute that value of x into the derivative — not into the original function.
  5. Check plausibility: where your function rises, the derivative should be positive; where it peaks, the derivative should cross zero.
  6. For a second derivative, differentiate the result again — that measures how the slope itself is changing.

Worked Example: Differentiating 3x² + 2x − 5

Differentiate term by term. The power rule turns 3x² into 3 · 2x = 6x. The term 2x has derivative 2, since x^1 differentiates to 1 and the coefficient survives. The constant −5 does not change, so its derivative is 0. Assembling: f′(x) = 6x + 2. At x = 2 the slope is 6(2) + 2 = 14 — the curve is climbing steeply there. At x = −1/3 the derivative is zero; that is the bottom of this upward parabola.

It is worth seeing once where the power rule comes from. For f(x) = x², the difference quotient is [(x + h)² − x²]/h = [2xh + h²]/h = 2x + h. As h shrinks to 0, this tends to 2x — exactly the power rule's answer. Every differentiation rule is this limit, pre-computed for a family of functions so you never have to redo it.

  • d/dx of e^x = e^x — the function that is its own derivative
  • d/dx of sin(x) = cos(x); d/dx of cos(x) = −sin(x)
  • d/dx of ln(x) = 1/x
  • d/dx of x³ − 4x = 3x² − 4, which at x = 1 gives a slope of −1

Using the Derivative: Tangent Lines

A derivative becomes concrete the moment you build a tangent line from it. For f(x) = 3x² + 2x − 5 at x = 2, the function value is f(2) = 12 + 4 − 5 = 11 and the slope there is f′(2) = 14, so the tangent line through the point (2, 11) is y = 11 + 14(x − 2). Near x = 2 the curve hugs this line closely, which is why tangent lines power linear approximation: the curve's messy behaviour is replaced, locally, by arithmetic. Newton–Raphson root-finding, sensitivity analysis in engineering, and marginal analysis in economics are all, underneath, this one move repeated.

One caveat completes the picture: not every point has a derivative. A sharp corner, like the point of y = |x| at x = 0, has a left slope of −1 and a right slope of +1, and a limit that depends on the side is no derivative at all. Vertical tangents and discontinuities fail the test too. When a calculator returns a derivative everywhere except one point, that exception is usually a corner or break in the original graph rather than a malfunction.

Slip-Ups That Cost Marks

The classic error is forgetting the chain rule on composite functions: the derivative of (2x + 1)³ is not 3(2x + 1)² but 3(2x + 1)² · 2 = 6(2x + 1)², because the inner function is also changing. Next come sign slips on cos(x), whose derivative carries a minus, and the habit of differentiating a product as if it were a sum — (fg)′ is f′g + fg′, never f′g′. Two evaluation mistakes round out the list: substituting the point into the original function and reporting that as the slope, and differentiating e^x correctly but treating a base like 2^x the same way, when 2^x differentiates to 2^x · ln 2. Each of these is easy to commit by hand and easy to catch by comparing against a calculated result.

From Derivatives to the Rest of Calculus

Nested functions are where derivatives get interesting, and the Chain Rule Calculator is devoted to exactly that pattern. To run differentiation backwards — recovering a function from its rate of change — turn to the Integral Calculator. Both are part of the math collection, where the calculus tools are gathered together.

Frequently Asked Questions FAQ

What does a derivative represent?

It represents instantaneous rate of change and the tangent slope where the derivative exists.

What is the power rule?

d(xⁿ)/dx = nxⁿ⁻¹.

Where are derivatives used?

They are used in rates of change, optimization, motion, modeling, and calculus.

Have Feedback or a Suggestion?

We'd love to hear your feedback or suggestions about this calculator.