How to use the derivative calculator
- Type your function using x, for example
3x^2 + sin(x), or tap the helper keys. - Read the derivative f′(x) and the rules used at each step.
- Turn on Second derivative if you also need f″(x).
- Enter a value in At x = to get the slope and the tangent line at that point.
What is a derivative?
The derivative of a function tells you its instantaneous rate of change, which is the slope of the tangent line at each point. If f(x) gives the position of a car, f′(x) gives its speed. It is defined as a limit:
f′(x) = lim (h → 0) of [f(x + h) − f(x)] ÷ h In practice you rarely use the limit. Instead you apply a small set of rules, which is exactly what this calculator does and shows. For the default example, the slope of x2sin(3x) at x = 1 is about -2.6877.
Derivative rules
| Rule | Function | Derivative |
|---|---|---|
| Constant | c | 0 |
| Power | xn | nxn−1 |
| Constant multiple | c·f(x) | c·f′(x) |
| Sum and difference | f ± g | f′ ± g′ |
| Product | f·g | f′g + fg′ |
| Quotient | f/g | f′g − fg′/g2 |
| Chain | f(g(x)) | f′(g(x))·g′(x) |
| Sine and cosine | sin x, cos x | cos x, −sin x |
| Tangent | tan x | sec2 x |
| Exponential | ex, ax | ex, ax ln a |
| Logarithm | ln x, loga x | 1/x, 1/x ln a |
| Inverse trig | sin−1 x, tan−1 x | 1/√(1 − x2), 1/1 + x2 |
Worked examples
Power rule: 4x3 − 5x2 + 7x − 2
Bring each power down and subtract 1 from it. The constant −2 has derivative 0. The result is 12x2 − 10x + 7.
Product rule: x3ln(x)
Let u = x³ and v = ln(x), so u′ = 3x² and v′ = 1/x. Then u′v + uv′ = 3x² ln(x) + x³ · 1/x, which simplifies to x2 + 3x2·ln(x).
Quotient rule: x2 + 1/x − 1
Let u = x² + 1 and v = x − 1, so u′ = 2x and v′ = 1. The quotient rule gives [2x(x − 1) − (x² + 1)] ÷ (x − 1)², which simplifies to x2 − 2x − 1/(x − 1)2.
Chain rule: √3x2 + 1
The outer function is √u with u = 3x² + 1. The derivative of √u is 1/(2√u), and u′ = 6x. Multiplying gives 3x/√3x2 + 1.
Common derivatives
| f(x) | f′(x) |
|---|---|
| x5 | 5x4 |
| 1/x | −1/x2 |
| √x | 1/2√x |
| sin(2x) | 2cos(2x) |
| cos(x2) | −2x·sin(x2) |
| tan(x) | sec2(x) |
| e−x | −e−x |
| 2x | 2x·ln(2) |
| ln(3x) | 1/x |
| log(x) | 1/x·ln(10) |
| tan−1(x) | 1/x2 + 1 |
| xex | ex + x·ex |
Common mistakes
- Forgetting the chain rule. The derivative of sin(3x) is 3cos(3x), not cos(3x). Always multiply by the derivative of the inside.
- Multiplying derivatives for a product. (fg)′ is f′g + fg′, not f′g′. For x² sin x, the answer is 2x sin x + x² cos x.
- Mixing up the quotient rule order. The top is u′v − uv′. Swapping the terms flips the sign of the answer.
- Using the power rule on eˣ. The power rule needs a constant power. eˣ has x in the power, so its derivative is eˣ, not x·eˣ⁻¹.
- Working in degrees. Trig derivatives only work in radians.
To check a numerical answer, plug values into the scientific calculator. For straight lines, the slope calculator finds the slope between two points, and the quadratic formula calculator finds where f′(x) = 0 when the derivative is a quadratic.
Frequently asked questions
What is a derivative?
A derivative measures how fast a function is changing. The derivative f′(x) gives the slope of the tangent line to y = f(x) at each x. For example, the derivative of x² is 2x, so at x = 3 the curve y = x² is rising with slope 6.
How do I enter functions into the derivative calculator?
Use x as the variable and type the function the way you would write it: x^3 for x³, sqrt(x) for √x, e^(2x) for e²ˣ, and sin(x), ln(x) or arctan(x) for functions. Multiplication can be implied, so 3x^2 sin(x) works. Put exponents with more than one term in brackets, like e^(3x).
When do I use the product rule vs the chain rule?
Use the product rule when two functions of x are multiplied, like x² · sin(x). Use the chain rule when one function is inside another, like sin(x²), where x² sits inside sine. Many problems need both: x² sin(3x) uses the product rule, and differentiating sin(3x) inside it uses the chain rule.
Why is the derivative of a constant 0?
A constant never changes, so its rate of change is 0. The graph of y = 5 is a flat horizontal line with slope 0 everywhere. That is why the +5 in 3x² + 5 disappears when you differentiate.
What is the derivative of e^x and ln(x)?
The derivative of eˣ is eˣ, which makes it the only function (apart from multiples of it) that equals its own derivative. The derivative of ln(x) is 1/x for x > 0. With the chain rule, e^(3x) becomes 3e^(3x) and ln(x² + 1) becomes 2x/(x² + 1).
Does the calculator use degrees or radians for trig?
Radians. The rule d/dx[sin x] = cos x is only true when x is in radians, so calculus always uses radians. If you need trig values in degrees, use the scientific calculator in DEG mode.
How do I find the equation of a tangent line?
Find the slope m = f′(a), find the point (a, f(a)), then use y − f(a) = m(x − a). Type a value in the "At x =" box and the calculator gives f(a), the slope and the tangent line in y = mx + b form. The slope calculator can help you check a line through two points.
Last reviewed November 27, 2026 by the ChalkStation team.