Derivative Calculator: Derivatives, Rules Used, Tangent Lines and Graphs
By FindMySum · Last reviewed
A derivative calculator finds the derivative of a function: a formula for its rate of change, or the slope of its graph at every point. This one differentiates symbolically, so you get an exact formula rather than a decimal estimate, then evaluates it at a point, gives the tangent line there, lists the rules it used and draws the function and its derivative together. It handles higher derivatives up to the fifth and partial derivatives in one variable. The worked example below uses the calculator's opening function, f(x) = x²·sin(x), at x = 1.
What a derivative measures
The average rate of change of f between x and x + h is the slope of the line through those two points, (f(x + h) − f(x)) ÷ h. As h shrinks towards 0, that secant line turns into the tangent line, and its slope becomes the derivative:
f′(x) = lim (h → 0) of (f(x + h) − f(x)) ÷ h
If f(t) is the distance a car has travelled after t hours, f′(t) is its speed at time t. Working out limits for every function would be slow, so in practice derivatives are found with a short list of rules.
The differentiation rules
- Constant rule: the derivative of a constant is 0.
- Power rule: d/dx xⁿ = n·xⁿ⁻¹, for any real n. So x³ → 3x², √x = x^½ → ½x^(−½), 1/x = x⁻¹ → −x⁻².
- Constant multiple and sum rules: constants come along for the ride, and you differentiate a sum term by term: (3x² + 5x)′ = 6x + 5.
- Product rule: (u·v)′ = u′·v + u·v′.
- Quotient rule: (u/v)′ = (u′·v − u·v′) ÷ v².
- Chain rule: for a function inside another, (f(g(x)))′ = f′(g(x))·g′(x). For sin(x²) the outer derivative is cos(x²), times the inner derivative 2x.
- Standard functions: (sin x)′ = cos x, (cos x)′ = −sin x, (tan x)′ = sec²x, (eˣ)′ = eˣ, (ln x)′ = 1/x, and so on.
The calculator applies these rules automatically and lists the ones your function needs under the answer.
Worked example: x²·sin(x)
The function is a product of u = x² and v = sin x, so it needs the product rule, with the power rule for u and the trigonometric rule for v:
u′ = 2x, v′ = cos x
f′(x) = u′v + uv′ = 2x·sin(x) + x²·cos(x)
At x = 1 (in radians):
- f(1) = 1² × sin 1 = 0.84147
- f′(1) = 2 sin 1 + cos 1 = 1.68294 + 0.54030 = 2.22324
So the graph rises with a slope of about 2.22 at x = 1. The tangent line there is y = f′(1)(x − 1) + f(1) = 2.22324(x − 1) + 0.84147, or y = 2.22324x − 1.38177. These are the values the calculator shows by default.
Higher derivatives
Differentiating again gives the second derivative f″, then f‴ and so on. The second derivative describes curvature: where f″ > 0 the graph bends upward, where f″ < 0 it bends downward. In motion problems, if f is position, f′ is velocity and f″ acceleration. Set the order to 2 for f″; the table lists every derivative from f′ up to the order you chose.
For example, f(x) = x⁴ has f′ = 4x³, f″ = 12x², f‴ = 24x, f⁽⁴⁾ = 24 and f⁽⁵⁾ = 0: each derivative of a polynomial lowers the degree by one until nothing is left.
Partial derivatives
For a function of several variables, a partial derivative differentiates with respect to one of them while holding the others fixed. Choose the variable to differentiate with respect to: every other letter is treated as a constant. ∂/∂x of a·x² + b·x is 2a·x + b. Since those letters have no values, the calculator gives the formula but no number at the point.
Notation and conventions
Type functions the way you would on a scientific calculator: x^2 for x², sqrt(x), e^x or exp(x), and 2x or 3sin(x) for multiplication. Two conventions matter:
- log and ln. log(x) is the base-10 logarithm and ln(x) the natural logarithm, as on calculators. Many calculus books write log for the natural log; if yours does, type ln. The derivatives differ: (ln x)′ = 1/x, while (log₁₀ x)′ = 1/(x·ln 10).
- Radians. Trigonometric functions use radians, because the rule (sin x)′ = cos x is only true in radians.
The simplified answer may look different from a textbook's and still be equal: 2 sin x cos x and sin 2x are the same function. Comparing values at a point is a quick check.
Limits of the calculator
It differentiates explicit formulas in one variable at a time. It doesn't do implicit differentiation (like x² + y² = 25), piecewise functions, step-by-step working for each rule, or integrals. To see how a derivative relates to the average rate of change over an interval, try the average rate of change calculator.
More questions
What is the derivative of a constant?
Zero. A constant doesn't change as x changes, so its graph is a horizontal line with slope 0. That is also why adding a constant to a function doesn't change its derivative: x² + 5 and x² − 3 both have derivative 2x.
How are derivatives used outside maths class?
Anywhere a rate of change matters. In physics, velocity is the derivative of position and acceleration the derivative of velocity. In economics, marginal cost is the derivative of total cost with respect to quantity. Engineers and data scientists set derivatives to zero to find the best design or the lowest error.
Can a function have no derivative at a point?
Yes. |x| has a sharp corner at 0, so its slope jumps from −1 to 1 and there is no single tangent. Functions also fail to be differentiable where they are undefined or jump, and where the tangent is vertical, such as the cube root at 0. The calculator shows a dash when the derivative isn't defined at your point.
What does the sign of the derivative tell me?
Where f′(x) > 0 the function is increasing, where f′(x) < 0 it is decreasing, and where f′(x) = 0 it has a horizontal tangent: a local maximum, a local minimum or a flat inflection. The graph under the calculator shows f and f′ together, so you can see the slope change sign at the peaks and troughs.
What is the derivative of e^x and why is it special?
e^x is its own derivative: d/dx e^x = e^x. It is the only function (up to a constant multiple) with that property, which is why e appears in growth, decay and compound interest. For another base, d/dx a^x = a^x·ln a.
Sources
This article explains how the calculator works and is general information, not financial, tax, legal or medical advice. Rules change; check the sources above or a qualified professional before you act.