Derivative Calculator
Type a function and get its derivative symbolically — simplified, with the rule named at every step (power, product, quotient, chain, exponential), up to the fifth derivative, the value at any point you choose, and a graph of the function beside its derivative. It runs entirely in your browser. Free, no sign-up.
Use + − * / ^ and brackets. 2x, x sin x and (x+1)(x−1) multiply. Functions: sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, exp, ln, log (base 10), sqrt, abs. Constants: pi and e. Decimals use a point.
A number or a constant such as 2, −1.5 or pi/4.
Results
Read as:
Derivative
At x = 1
sin(1) ≈ 0.84147098
f(x)
2sin(1) + cos(1) ≈ 2.2232443
f′(x)
Step-by-step working
Each line differentiates one part of the expression, outermost first, and names the rule used.
Product rule
(uv)′ = u′v + uv′, with u = x² and v = sin(x). Here u′ = 2x and v′ = cos(x).
d/dx[x² sin(x)] = 2x sin(x) + x² cos(x)
Power rule
(xⁿ)′ = n·xⁿ⁻¹, here with n = 2: bring the exponent down and lower it by 1.
d/dx[x²] = 2x
Standard derivative
The standard derivative of sin(x) is cos(x).
d/dx[sin(x)] = cos(x)
Graph
- f(x) (the function)
- f′(x) (the derivative)
How to Use the Derivative Calculator
- 1. Type the function. Write it the way you would on paper:
3x^4 - 2x^2 + 7x,x^2 sin(x),(x^2+1)/(x-1),e^(-x^2). Multiplication can be left out between a number or letter and what follows, so2xandx sin xwork. - 2. Choose the variable and the order. The derivative is taken with respect to
xunless you pick another letter; every other letter is treated as a constant. Order 2 gives the second derivative, and so on up to 5. - 3. Add a point if you want a number. Enter
2,-1.5orpi/4to get the function and its derivative evaluated there, exactly where the algebra allows (1/2, 2sin(1) + cos(1)) and as a decimal. - 4. Read the working. The answer appears first, then every derivative up to the order you chose, then one line per subexpression naming the rule used and the derivative it produced.
The Rules the Calculator Applies
| Rule | Formula | Example |
|---|---|---|
| Constant multiple | (c·g)′ = c·g′ | (5x³)′ = 15x² |
| Sum | (f + g)′ = f′ + g′ | (x² + sin x)′ = 2x + cos x |
| Power | (xⁿ)′ = n·xⁿ⁻¹ | (x⁵)′ = 5x⁴, (√x)′ = 1/(2√x) |
| Product | (uv)′ = u′v + uv′ | (x² sin x)′ = 2x sin x + x² cos x |
| Quotient | (u/v)′ = (u′v − uv′)/v² | (sin x / x)′ = (x cos x − sin x)/x² |
| Chain | (f(u))′ = f′(u)·u′ | (sin x²)′ = 2x cos x² |
| Exponential | (aᵘ)′ = aᵘ·ln a·u′ | (2ˣ)′ = 2ˣ ln 2, (e^(−x²))′ = −2x e^(−x²) |
| General power | (uᵛ)′ = uᵛ(v′ ln u + v u′/u) | (xˣ)′ = xˣ(ln x + 1) |
Standard derivatives it knows: sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, ln, log (base 10), sqrt and abs.
Worked Examples
Product and chain rules together. For f(x) = x² sin(x), the product rule with u = x² and v = sin x gives u′v + uv′ = 2x sin x + x² cos x. At x = 1 that is 2 sin 1 + cos 1 ≈ 2.2232443. For f(x) = sin(x²) the outer function is sine and the inside is u = x², so f′(x) = cos(x²)·2x = 2x cos(x²).
Quotient rule, then higher orders. For f(x) = (x² + 1)/(x − 1), u′v − uv′ = 2x(x − 1) − (x² + 1) = x² − 2x − 1, so f′(x) = (x² − 2x − 1)/(x − 1)². At x = 3 that is 2/4 = 1/2. Differentiating again, the numerator of the second derivative has a factor of (x − 1) that cancels, leaving f″(x) = 4/(x − 1)³ — the calculator cancels such factors so higher derivatives come out in their short form.
How Your Input Is Read
- Multiplication.
2x,3(x+1),(x+1)(x-1)andx sin xmultiply. A bare number cannot follow a letter or bracket (x2is refused, not guessed): writex*2or2x. - Division. Implicit multiplication ranks with
*and/, left to right, so1/2xmeans (1/2)·x. Write1/(2x)for the other reading. The “Read as” line shows exactly what was understood. - Powers.
-x^2is −(x²),2^-xis 2 raised to −x, anda^b^cis a^(b^c).sin^2(x)means (sin x)².sin^-1(x)is refused as ambiguous — typeasin(x)or1/sin(x). - Functions without brackets.
sin x,ln x^2(that is ln of x²) andsin 2xtake one simple argument;sin x (x+1)is sin(x) times (x+1). - Names. Variables are single letters,
eis Euler's number,pior π is π,exp(x)is eˣ,lnis the natural logarithm andlogis base 10.log(x, 2)is the base-2 logarithm. Angles are in radians.
What to Keep in Mind
Results are simplified to a conventional form — like terms combined, polynomials expanded, shared factors pulled out, and common factors cancelled between numerator and denominator — but a different-looking answer can still be correct. Check by evaluating both at a point. Cancelling a factor such as (x − 1) can quietly widen the domain at x = 1, as in any algebra system, so a derivative is only claimed where the original function is defined.
The derivative of |u| is u·u′/|u|, which does not exist where u = 0; the graph shows the corner. The tool differentiates explicit functions of one chosen variable, treating other letters as constants (which is how a partial derivative is taken); it does not do implicit differentiation.
Frequently Asked Questions
- How do you find a derivative step by step?
- Identify the outermost structure of the expression and apply the matching rule: split sums term by term, pull out constant factors, use the product or quotient rule when two parts both contain the variable, and the chain rule when a function has something other than x inside it. Then repeat on each piece. The working above follows exactly that order, outermost first.
- When do I use the chain rule, and when the product rule?
- Use the product rule when two factors multiplied together both depend on x, as in x² sin x. Use the chain rule when one function sits inside another, as in sin(x²) or e^(3x). Many problems need both, like x² sin(3x).
- What is the second derivative used for?
- It is the derivative of the derivative, so it measures how fast the slope itself changes. A positive second derivative means the graph is concave up (curving like a cup); a negative one means concave down. At a point where f′ = 0, the sign of f″ tells a maximum from a minimum.
- Can I take a partial derivative?
- Yes, in the sense that matters for computing one. Type the function with several letters, such as x^2 y + sin(y x), and choose the variable to differentiate with respect to; the other letters are held constant. The graph is hidden for functions of more than one variable.
- Why is the derivative of |x| undefined at 0?
- The graph of |x| has a sharp corner at the origin: the slope is −1 just to the left and +1 just to the right, so there is no single tangent line. Away from 0 the derivative is x/|x|, which equals −1 for negative x and +1 for positive x.
- Is log the natural logarithm or base 10?
- Here
logis base 10, as on a scientific calculator, andlnis the natural logarithm; subjects differ on this, so check your textbook. For any other base typelog(x, b). The derivative of log(x) is 1/(x ln 10), and of ln(x) is 1/x. - Why does my answer look different from the textbook's?
- Equivalent expressions can be written many ways: (x + 1)eˣ and xeˣ + eˣ are the same function. If the form differs, evaluate both at a point or two — the values at your chosen point let you do that — rather than assuming one is wrong.