# Derivative Calculator With Steps

The derivative of x² sin(x) is f′(x) = 2x sin(x) + x² cos(x), found with the product rule. At x = 1 the slope is 2.223244275. Type any function of x and the tool shows the derivative, the rule used at each step, the second derivative and the slope at a point you choose.

Canonical page: https://ponderloop.com/tools/derivative-calculator/
Updated: 2026-11-18

## How to use

How to find a derivative with steps

1. **Type the function**: Enter a function of x, for example x^2 sin(x). Use ^ for powers, / for division, parentheses for grouping, and names such as sin, ln, sqrt and e^x.
2. **Read the derivative**: The result appears as you type: for the example, f′(x) = 2x sin(x) + x² cos(x). Check the line “Read as” to confirm the calculator understood your input.
3. **Follow the steps**: Open “The working”. Each step names the rule (for the example: Product rule, Power rule, Trigonometric rule) and shows the part it applies to, then a Combine line gives the simplified result.
4. **Get the slope at a point**: Enter a value such as 1, -1/2 or pi/4 in the point box to see f(a), f′(a), f″(a) and the tangent line.

## Reference tables and worked examples

### Worked examples

Each row is this calculator’s own output. The last column lists the rules named in its working.

| Function f(x) | Derivative f′(x) | Rules used |
| --- | --- | --- |
| x³ + 2x | 3x² + 2 | Sum rule, Power rule, Constant multiple rule |
| x² sin(x) | 2x sin(x) + x² cos(x) | Product rule, Power rule, Trigonometric rule |
| x/(x + 1) | 1/(x + 1)² | Quotient rule, Power rule, Sum rule, Constant rule |
| sin(3x) | 3 cos(3x) | Chain rule, Constant multiple rule, Power rule |
| ln(x² + 1) | 2x/(x² + 1) | Chain rule, Sum rule, Power rule, Constant rule |
| e^x cos(x) | e^x cos(x) − e^x sin(x) | Product rule, Exponential rule, Power rule, Trigonometric rule |
| atan(2x) | 2/(4x² + 1) | Chain rule, Constant multiple rule, Power rule |
| sqrt(1 − x²) | −x/sqrt(1 − x²) | Chain rule, Sum rule, Constant rule, Constant multiple rule, Power rule |
| x^x | x^x · (ln(x) + 1) | General power rule, Power rule |

### Differentiation rules the calculator applies

The example column is the tool’s output for the function shown.

| Rule | Formula | Example f(x) | Example f′(x) |
| --- | --- | --- | --- |
| Constant rule | d/dx[c] = 0 | 7 | 0 |
| Power rule | d/dx[xⁿ] = n·xⁿ⁻¹ | x⁵ | 5x⁴ |
| Constant multiple rule | d/dx[c·f] = c·f′ | 4x³ | 12x² |
| Sum rule | d/dx[f + g] = f′ + g′ | x² + 3x | 2x + 3 |
| Product rule | d/dx[f·g] = f′·g + f·g′ | x e^x | e^x + x e^x |
| Quotient rule | d/dx[f/g] = (f′·g − f·g′)/g² | sin(x)/x | (x cos(x) − sin(x))/x² |
| Chain rule | d/dx[f(g(x))] = f′(g(x))·g′(x) | (3x + 1)⁴ | 12(3x + 1)³ |
| Exponential rule | d/dx[eᵘ] = eᵘ·u′ and d/dx[aᵘ] = aᵘ·ln(a)·u′ | 2^x | 2^x ln(2) |
| Logarithm rule | d/dx[ln u] = u′/u and d/dx[log u] = u′/(u·ln 10) | ln(5x) | 1/x |
| Trigonometric rule | sin → cos, cos → −sin, tan → sec², sec → sec·tan, csc → −csc·cot, cot → −csc² | tan(x) | sec²(x) |
| Inverse trigonometric rule | asin → 1/√(1 − u²), acos → −1/√(1 − u²), atan → 1/(1 + u²) | asin(x) | 1/sqrt(1 − x²) |
| Hyperbolic rule | sinh → cosh, cosh → sinh, tanh → 1/cosh² | tanh(x) | 1/cosh²(x) |
| General power rule | d/dx[uᵛ] = uᵛ·(v′·ln u + v·u′/u) | x^x | x^x · (ln(x) + 1) |

### How to type a function

The second column shows how the calculator reads the input, so you can check it matches what you meant.

| You type | Read as |
| --- | --- |
| 2x | 2x |
| x(x+1) | x · (x + 1) |
| x^2 sin x | x² sin(x) |
| sin^2 x | sin²(x) |
| 1/2x | (1/2) · x |
| -x^2 | −x² |
| 2^-x | 2^(−x) |
| log10(x) | log(x) |
| e^(2x) | e^(2x) |
| pi x | π x |
| arctan(x) | atan(x) |

## How it works

The input is read by a small recursive-descent parser into a tree of numbers, x, constants, sums, products, quotients, powers and functions. Numbers are exact fractions, so 0.5 is 1/2 and no rounding happens until a value at a point is shown. Differentiation walks the tree and applies one rule per node (constant, power, constant multiple, sum, product, quotient, chain, exponential, logarithm, trigonometric, inverse trigonometric, hyperbolic, and the general power rule uᵛ by logarithmic differentiation), writing a step for each. The simplifier then folds numbers, collects like terms and powers, cancels common factors and writes negative powers as fractions; it assumes a cancelled factor is not zero and it knows no trigonometric identities, so the output is correct but not always the shortest form. Values at a point use double-precision arithmetic, shown to 10 significant digits. The engine is tested on dozens of functions by comparing f′ and f″ with central-difference estimates computed independently of the engine.

## FAQ

### How does the calculator show its steps?

It differentiates the function you typed exactly as you wrote it and records one step per rule. For x² sin(x) it names Product rule, Power rule, Trigonometric rule, then a Combine step gives 2x sin(x) + x² cos(x). Nested parts, such as the inside of a chain rule, are indented one level.

### What can I type?

Powers with ^, + − × ÷, parentheses and implicit multiplication (2x, x · (x + 1), x² sin(x)). Constants are e and pi. Functions are sin, cos, tan, sec, csc, cot, asin, acos, atan, sinh, cosh, tanh, exp, ln, log (base 10), sqrt and abs. A function can be written without parentheses when its argument is simple: sin x^2 means sin(x²), and sin^2 x means sin(x)². Note that 1/2x is read left to right as (1/2)x, so its derivative is 1/2.

### Is the answer fully simplified?

Not always. The simplifier folds exact numbers, collects like terms and powers, cancels common factors and multiplies out polynomials, but it has no trigonometric identities and does not factor. The result is correct but may be longer than a textbook answer: for (2x + 1)/(x² + 3) the second derivative comes out as ((−4x − 2) · (x² + 3)² + 8x⁵ + 8x⁴ + 24x² − 72x)/(x² + 3)⁴, and cos²(x) − sin²(x) is the derivative of sin(x) cos(x) where a book would write cos(2x).

### How is the second derivative found?

The calculator simplifies the first derivative and then differentiates that again, with its own list of steps under “Steps for f″”. For x² sin(x) the second derivative is 2 sin(x) + 4x cos(x) − x² sin(x).

### How do I get the slope or tangent line at a point?

Enter the point in the second box. For x² sin(x) at x = 1 the slope is f′(1) = 2.223244275 and the tangent line is y = 2.223244275x − 1.381773291. Values are decimals to 10 significant digits; the derivative itself stays exact.

### What happens where a function has no derivative?

The derivative of abs(x) is x/abs(x), which is undefined at 0, and the tool says so: f′(0) shows “undefined”. It does not check differentiability in general, so for functions with corners or breaks look at where the formula divides by zero or leaves the domain.

### Can it do other logarithm bases, integrals or partial derivatives?

Not directly. Log means base 10 and ln means base e; for another base write ln(x)/ln(b), for example ln(x)/ln(2), whose derivative is 1/(x ln(2)). It differentiates one variable, x, and does not integrate, differentiate implicitly or take partial derivatives.

### Is anything uploaded?

No. The parser, the differentiation rules and the simplifier all run in your browser, and what you type is not sent or stored anywhere.

## Sources

- [OpenStax, Calculus Volume 1, Chapter 3: Derivatives (power, product, quotient and chain rules; trigonometric, inverse and exponential functions)](https://openstax.org/books/calculus-volume-1/pages/3-introduction)
- [NIST Digital Library of Mathematical Functions, §4.13: derivatives of the logarithm and exponential](https://dlmf.nist.gov/4.13)
- [NIST Digital Library of Mathematical Functions, §4.26: derivatives of the trigonometric functions](https://dlmf.nist.gov/4.26)
- [NIST Digital Library of Mathematical Functions, §4.34: derivatives of the hyperbolic functions](https://dlmf.nist.gov/4.34)

---

Cite as: Derivative Calculator With Steps, ponderloop, https://ponderloop.com/tools/derivative-calculator/, updated 2026-11-18
