Calcist

Style

Buttons

Spacing

How much to show

Decimal places

Text size

Derivative calculator

Type a function of x. You get its derivative, the second derivative, the slope at any point you choose, and every rule used along the way, in plain English.

Use x, numbers, + − * / ^ and brackets, with sin, cos, tan, sec, csc, cot, arcsin, arccos, arctan, e^x, ln, log (base 10), log_2(x), sqrt and abs. You can write 2x, sin x and pi.

Private: calculated on your device. Nothing you type is sent anywhere.

Next: Going the other way? The integral calculator finds antiderivatives. To see where a graph bends, use the inflection point calculator.

What a derivative tells you

The derivative f′(x) is the slope of the graph of f at each point: how fast f is changing right there. Use it for velocity from position, marginal cost from total cost, the tangent line to a curve, or to find where a function rises, falls and turns.

How it's calculated

The calculator reads your function into a tree of pieces (sums, products, powers and functions) and works from the outside in, applying one rule at each level. Then it tidies the result so you don't see clutter like 1·x⁰.

Power rule: d/dx xⁿ = n·xⁿ⁻¹
Product rule: (fg)′ = f′g + fg′
Quotient rule: (f/g)′ = (f′g − fg′)/g²
Chain rule: d/dx f(g(x)) = f′(g(x))·g′(x)

The trig rules are d/dx sin x = cos x, d/dx cos x = −sin x, d/dx tan x = sec²x, d/dx sec x = sec x tan x, d/dx csc x = −csc x cot x and d/dx cot x = −csc²x.

Worked example

Differentiate f(x) = x² sin x and find the slope at x = π/2.

  1. It's a product, so use the product rule with f = x² and g = sin x.
  2. f′ = 2x by the power rule, and g′ = cos x.
  3. So f′(x) = 2x·sin x + x²·cos x.
  4. At x = π/2, sin x = 1 and cos x = 0, so f′(π/2) = 2(π/2)(1) + 0 = π ≈ 3.14159.

A chain rule example: d/dx arcsin(2x) = 2/√(1 − 4x²). The outer function is arcsin u with derivative 1/√(1 − u²), and the inside u = 2x has derivative 2.

Derivatives of inverse trig functions

FunctionDerivativeWhere it holds
arcsin x1/√(1 − x²)−1 < x < 1
arccos x−1/√(1 − x²)−1 < x < 1
arctan x1/(1 + x²)all x
arccot x−1/(1 + x²)all x
arcsec x1/(|x|√(x² − 1))|x| > 1
arccsc x−1/(|x|√(x² − 1))|x| > 1

With the chain rule, replace x by u and multiply by u′. For example, d/dx arctan(x²) = 2x/(1 + x⁴).

Exponential and logarithm rules

FunctionDerivative
eˣeˣ
e^g(x)e^g(x) · g′(x)
aˣ (a > 0)aˣ · ln a
ln x (x > 0)1/x
ln g(x)g′(x)/g(x)
log_b x1/(x · ln b)

Logarithmic differentiation

When both the base and the power contain x, as in y = xˣ, none of the rules above fits. Take ln of both sides, ln y = x ln x, differentiate (y′/y = ln x + 1) and multiply by y. So d/dx xˣ = xˣ(ln x + 1). The calculator does this automatically and shows the steps.

Limitations

  • One variable, x. Partial derivatives of f(x, y) are on the directional derivative calculator.
  • The answer is simplified sensibly, not into one "canonical" form, so it may look different from your textbook while being equal. Check by evaluating both at a point.
  • Simplifying can hide where f is undefined. For example, x/x simplifies to 1, but the original isn't defined at 0.
  • Implicit differentiation (an equation in x and y) isn't supported.

Sources

Learn: Derivative rules table

How we checked this

Before every update, this calculator is run in a real browser with these known answers, and it must match all of them:

  • x²·sin x by the product rule: 2x·sin x + x²·cos x ✓
  • arcsin x → 1/√(1 − x²) ✓
  • log₂ x → 1/(x ln 2) ✓
  • Slope of sin x at π/3 is cos(π/3) = 1/2 ✓
  • xˣ at x = 1 (logarithmic differentiation): slope 1 ✓
  • |x| has no derivative at 0 ✓

Last checked October 26, 2026. Spotted something wrong? The math is done in your browser with the formula shown on this page, so you can check any result by hand.

Add this calculator to your website (free)

Paste this code into any web page. The calculator works on your page, resizes itself, has no ads and no tracking, and nothing your visitors type is sent anywhere. More about embedding.

Questions people ask

What is the derivative of arcsin x?

d/dx arcsin x = 1/√(1 − x²), for −1 < x < 1. With an inside function u, it's u′/√(1 − u²).

What is the derivative of log x?

For log base b, d/dx log_b x = 1/(x ln b). So the derivative of log₁₀ x is 1/(x ln 10), and the derivative of ln x is 1/x.

What is the derivative of an exponential function?

d/dx eˣ = eˣ, and for any base a > 0, d/dx aˣ = aˣ ln a. With an exponent g(x), multiply by g′(x).

What is the derivative of inverse tangent?

d/dx arctan x = 1/(1 + x²). It's defined for every x, so arctan has a derivative everywhere.

When do I use logarithmic differentiation?

When x appears in both the base and the exponent, like xˣ or (sin x)ˣ, or to simplify a long product or quotient before differentiating.

Related calculators