---
title: "Derivative Calculator with Steps: Free d/dx Solver"
description: "Free derivative calculator with steps. Differentiate any function using the power, product, quotient and chain rules, then get the tangent line and a graph."
url: https://chalkstation.com/math/derivative-calculator
source: ChalkStation (free school tools)
---

# Derivative Calculator

Type a function of x to get its derivative with every rule shown step by step. For example, the derivative of _x_2sin(3_x_) is **2_x_·sin(3_x_) + 3_x_2·cos(3_x_)**.

_Interactive tool: open https://chalkstation.com/math/derivative-calculator to use it in your browser. It is free with no sign-up._

## Worked example

Derivative

d/dx\[_x_2sin(3_x_)\]

f′(_x_) = 2_x_·sin(3_x_) + 3_x_2·cos(3_x_)

f(1)

0.14112

Slope f′(1)

−2.687737

Tangent line at x = 1

y = −2.6877_x_ + 2.8289

f(_x_)f′(_x_)tangent line

### Step by step

1.  **Product rule**: (_uv_)′ = _u_′_v_ + _uv_′ with _u_ = _x_2 and _v_ = sin(3_x_).
2.  **Power rule**: bring the power down and subtract 1. d/dx\[_x_2\] = 2_x_2 − 1 = 2_x_
3.  **Chain rule**: sin(3_x_) is an outer function of _u_ = 3_x_. By the trig rule, d/du\[sin(_u_)\] = cos(_u_), so multiply by _u_′.
4.  **Constant multiple rule**: keep the constant and differentiate the rest. d/dx\[3_x_\] = 3·d/dx\[_x_\] = 3
5.  **Power rule**: d/dx\[_x_\] = 1.
6.  Put the chain rule together: d/dx\[sin(3_x_)\] = 3cos(3_x_)
7.  Put the product rule together: d/dx\[_x_2sin(3_x_)\] = 2_x_·sin(3_x_) + _x_2·3cos(3_x_) = 2_x_·sin(3_x_) + 3_x_2·cos(3_x_)

## How to use the derivative calculator

1.  Type your function using x, for example `3x^2 + sin(x)`, or tap the helper keys.
2.  Read the derivative f′(x) and the rules used at each step.
3.  Turn on **Second derivative** if you also need f″(x).
4.  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 _x_2sin(3_x_) at x = 1 is about **\-2.6877**.

## Derivative rules

| Rule | Function | Derivative |
| --- | --- | --- |
| Constant | _c_ | 0 |
| Power | _x__n_ | _n__x__n_−1 |
| Constant multiple | _c_·_f_(_x_) | _c_·_f_′(_x_) |
| Sum and difference | _f_ ± _g_ | _f_′ ± _g_′ |
| Product | _f_·_g_ | _f_′_g_ + _f__g_′ |
| Quotient | _f_/_g_ | _f_′_g_ − _f__g_′/_g_2 |
| 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 | _e__x_, _a__x_ | _e__x_, _a__x_ ln _a_ |
| Logarithm | ln _x_, log_a_ _x_ | 1/_x_, 1/_x_ ln _a_ |
| Inverse trig | sin−1 _x_, tan−1 _x_ | 1/√(1 − _x_2), 1/1 + _x_2 |

## Worked examples

### Power rule: 4_x_3 − 5_x_2 + 7_x_ − 2

Bring each power down and subtract 1 from it. The constant −2 has derivative 0. The result is **12_x_2 − 10_x_ + 7**.

### Product rule: _x_3ln(_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 **_x_2 + 3_x_2·ln(_x_)**.

### Quotient rule: _x_2 + 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 **_x_2 − 2_x_ − 1/(_x_ − 1)2**.

### Chain rule: √3_x_2 + 1

The outer function is √u with u = 3x² + 1. The derivative of √u is 1/(2√u), and u′ = 6x. Multiplying gives **3_x_/√3_x_2 + 1**.

## Common derivatives

| f(x) | f′(x) |
| --- | --- |
| _x_5 | 5_x_4 |
| 1/_x_ | −1/_x_2 |
| √_x_ | 1/2√_x_ |
| sin(2_x_) | 2cos(2_x_) |
| cos(_x_2) | −2_x_·sin(_x_2) |
| tan(_x_) | sec2(_x_) |
| _e_−_x_ | −_e_−_x_ |
| 2_x_ | 2_x_·ln(2) |
| ln(3_x_) | 1/_x_ |
| log(_x_) | 1/_x_·ln(10) |
| tan−1(_x_) | 1/_x_2 + 1 |
| _x__e__x_ | _e__x_ + _x_·_e__x_ |

## 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](https://chalkstation.com/math/scientific-calculator). For straight lines, the [slope calculator](https://chalkstation.com/math/slope-calculator) finds the slope between two points, and the [quadratic formula calculator](https://chalkstation.com/math/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](https://chalkstation.com/math/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](https://chalkstation.com/math/slope-calculator) can help you check a line through two points.

Last reviewed November 27, 2026 by the ChalkStation team.

## Related free tools

[**Scientific Calculator**A free online scientific calculator with trig, logs, powers, roots and memory.](https://chalkstation.com/math/scientific-calculator) [**Slope Calculator**Slope, line equation and distance from two points.](https://chalkstation.com/math/slope-calculator) [**Quadratic Formula Calculator**Solve ax² + bx + c = 0 with the quadratic formula, including complex roots.](https://chalkstation.com/math/quadratic-formula-calculator) [**Fraction Calculator**Add, subtract, multiply and divide fractions and mixed numbers.](https://chalkstation.com/math/fraction-calculator) [**Square Root Calculator**Square roots in simplest radical form and as a decimal.](https://chalkstation.com/math/square-root-calculator)
