My Calculator

Derivative Calculator

Differentiate any function with a full, copyable step-by-step solution — Power Rule, Product Rule, Quotient Rule, and Chain Rule applied automatically, plus a diagram of the function, its tangent line, and its derivative curve.

Use x² for powers, sqrt(x) / sin(x) / cos(x) / ln(x) / eˣ for functions. Leave the point blank to just see f'(x) symbolically.

Math Keyboard

Try an example

Functionf(x) = x³ - 3 · x² + 2 · x
Derivativef'(x) = 3 · x² - 3 · 2 · x + 2
f(1)0
Slope at x = 1-1
Tangent liney = 0 + -1(x - 1)

Derivative Diagram

The top curve is your function f(x) with the tangent line at your chosen point — its steepness is the derivative. The bottom curve is f'(x) itself, the slope-function, with the matching point marked so you can see exactly how the two connect.

(1, 0)slope = f'(1) = -1f(x)f'(1) = -1f'(x)
f(x)Tangent line at x = af'(x) — the derivativePoint x = a

Step-by-Step Solution

Here's exactly how this answer was calculated, one step at a time.

Given: d/dx [ x³ - 3 · x² + 2 · x ]

  1. Step 1: Apply the Power Rule

    Power Rule: d/dx[xⁿ] = n·xⁿ⁻¹. Bring the exponent down in front as a multiplier, then subtract 1 from the exponent.

    d/dx[x³] = 3·x²
  2. Step 2: Apply the Power Rule

    Power Rule: d/dx[xⁿ] = n·xⁿ⁻¹. Bring the exponent down in front as a multiplier, then subtract 1 from the exponent.

    d/dx[x²] = 2·x¹
  3. Step 3: Apply the Constant Multiple Rule

    3 is a constant (it has no x in it), so it just carries through untouched: d/dx[k·u] = k·u'.

    d/dx[3 · x²] = 3 · (2 · x)
  4. Step 4: Apply the Difference Rule

    Difference Rule: differentiate each term separately, then subtract: d/dx[u - v] = u' - v'.

    d/dx[x³ - 3 · x²] = 3 · x² - 3 · 2 · x
  5. Step 5: Apply the Constant Multiple Rule

    2 is a constant (it has no x in it), so it just carries through untouched: d/dx[k·u] = k·u'.

    d/dx[2 · x] = 2 · (1)
  6. Step 6: Apply the Sum Rule

    Sum Rule: the derivative of a sum is the sum of the derivatives of each term. Differentiate each piece on its own, then add the results back together: d/dx[u + v] = u' + v'.

    d/dx[x³ - 3 · x² + 2 · x] = 3 · x² - 3 · 2 · x + 2
  7. Step 7: Simplify the Result

    Combine like terms, cancel where possible, and write the differentiated expression in its simplest form — this is the final derivative.

    f'(x) = 3 · x² - 3 · 2 · x + 2

The derivative is:

f'(x) = 3 · x² - 3 · 2 · x + 2

Free Online Derivative Calculator with Steps

This derivative calculator finds the derivative of almost any function instantly, with a fully worked, step-by-step solution you can copy and paste directly into your notes or homework. Type in your function using standard notation such as x², sin(x), sqrt(x), ln(x), or eˣ, and the calculator automatically detects which differentiation rule (or combination of rules) applies — the Power Rule, Product Rule, Quotient Rule, Chain Rule, and every standard trigonometric, logarithmic, and exponential derivative formula — then shows you exactly how each rule was applied, in order, until it reaches the final simplified answer.

Enter an optional point x = a and the calculator goes a step further: it evaluates the derivative at that exact point to give you the instantaneous slope of the curve, works out the equation of the tangent line, and plots a diagram of f(x) together with that tangent line and the derivative function f'(x) itself, so every number in the solution is also something you can literally see on the graph. Whether you're a calculus student learning differentiation rules for the first time, double-checking homework before a test, or an engineer who needs a fast and reliable derivative solver, this tool is built to handle polynomials, trigonometric functions, radicals, exponentials, logarithms, and any nested combination of them.

What Is a Derivative in Calculus?

A derivative measures how fast a function's output changes as its input changes — in plain terms, it's the slope of the curve at a single, exact point. If f(x) describes the position of a moving object over time, the derivative f'(x) describes its instantaneous velocity at that moment. If f(x) describes profit as a function of units sold, f'(x) describes the marginal profit gained from selling one more unit. The derivative turns a curve, which has a different steepness everywhere, into a new function that tells you the exact steepness at any single point you choose.

Formally, the derivative of f(x) is defined as a limit: f'(x) = lim(h→0) [f(x+h) − f(x)] / h. This expression is the slope between two points on the curve that are h apart, and as h shrinks toward zero, that slope settles onto the exact slope of the tangent line at x. In practice, nobody re-derives this limit every time — instead, calculus gives us a toolbox of shortcut rules (covered below) that let you differentiate almost any function directly from its formula, without ever touching a limit by hand.

Derivative Notation

A derivative can be written several different, equivalent ways depending on the textbook or context:

  • f'(x) — Lagrange's notation, read as "f prime of x"
  • dy/dx or df/dx — Leibniz's notation, emphasizing the rate of change of y with respect to x
  • d/dx [f(x)] — an operator notation meaning "take the derivative of f(x) with respect to x"
  • y' — a shorthand used when y = f(x) is already defined
  • Dx[f(x)] — an alternative operator notation seen in some engineering texts

The Power Rule

The Power Rule is the single most-used differentiation rule, and it applies to any term of the form xⁿ: d/dx [xⁿ] = n·xⁿ⁻¹. In words, bring the exponent down in front as a multiplying coefficient, then reduce the exponent by exactly 1. For example, d/dx[x^5] = 5x^4, and d/dx[x] = 1 (since x is really x^1, so 1·x^0 = 1). The Power Rule also handles negative and fractional exponents the exact same way — d/dx[x^(-2)] = -2x^(-3), and d/dx[√x] = d/dx[x^(1/2)] = (1/2)x^(-1/2).

The Sum and Difference Rules

When a function is built from several terms added or subtracted together, you can differentiate each term completely independently and then add or subtract the results: d/dx[f(x) + g(x)] = f'(x) + g'(x), and d/dx[f(x) − g(x)] = f'(x) − g'(x). This is why differentiating a long polynomial is straightforward — differentiate term by term, using the Power Rule (and the Constant Multiple Rule below) on each piece, and combine.

The Constant Multiple Rule

Constants simply carry through a derivative unchanged: d/dx[k·f(x)] = k·f'(x), for any constant k. This is why d/dx[7x^3] = 7 · 3x^2 = 21x^2 — the 7 stays exactly where it is while the x^3 gets differentiated. Also remember d/dx[c] = 0 for any plain constant c with no x in it at all, since a constant never changes as x changes, so its rate of change is zero.

The Product Rule

When two functions that both depend on x are multiplied together, you cannot simply multiply their derivatives — you need the Product Rule: d/dx[u(x)·v(x)] = u'(x)v(x) + u(x)v'(x). In words: derivative of the first, times the second, plus the first, times the derivative of the second. For example, differentiating x^2·sin(x) gives 2x·sin(x) + x^2·cos(x) — notice both terms are added, and each one only differentiates one of the two original factors at a time.

The Quotient Rule

When one x-dependent function is divided by another, use the Quotient Rule: d/dx[u(x)/v(x)] = [u'(x)v(x) − u(x)v'(x)] / [v(x)]². In words: derivative of the top times the bottom, minus the top times the derivative of the bottom, all divided by the bottom squared. The order in the numerator matters — swapping u and v flips the sign of the answer, so it's worth memorizing the pattern exactly as written (some students remember it as "low d-high minus high d-low, over low squared").

The Chain Rule

The Chain Rule handles composite functions — a function nested inside another function, like sin(x^2) or √(3x + 1). It states: d/dx[f(g(x))] = f'(g(x))·g'(x). In words: differentiate the outer function first, leaving the inner function untouched inside it, then multiply by the derivative of that inner function. For sin(x^2), the outer function is sin(u) with derivative cos(u), and the inner function is u = x^2 with derivative 2x, so the full derivative is cos(x^2)·2x. The Chain Rule shows up constantly — anytime you see a function name applied to something more complicated than plain x, or any expression raised to a power, the Chain Rule is what's actually being used underneath the Power Rule too.

Common Derivative Formulas

A short reference table of the derivatives this calculator applies automatically, all assuming u is a function of x (so the Chain Rule multiplies by u' whenever u ≠ x):

  • d/dx[sin(u)] = cos(u)·u' and d/dx[cos(u)] = -sin(u)·u'
  • d/dx[tan(u)] = sec²(u)·u' and d/dx[cot(u)] = -csc²(u)·u'
  • d/dx[sec(u)] = sec(u)tan(u)·u' and d/dx[csc(u)] = -csc(u)cot(u)·u'
  • d/dx[eᵘ] = eᵘ·u' and d/dx[aᵘ] = aᵘ·ln(a)·u' for constant base a
  • d/dx[ln(u)] = u'/u and d/dx[logₐ(u)] = u' / (u·ln a)
  • d/dx[√u] = u' / (2√u) and d/dx[uⁿ] = n·uⁿ⁻¹·u'

How to Find a Derivative Step by Step

No matter how complicated the expression looks, the same general sequence works every time:

  • Step 1 — Look at the outermost structure of the expression: is it a sum/difference of terms, a product of two factors, a quotient, or a single function applied to something?
  • Step 2 — Match that structure to the correct rule: Sum/Difference Rule for added or subtracted terms, Product Rule for a multiplication of two x-dependent pieces, Quotient Rule for a fraction with x in the denominator, or Chain Rule for one function nested inside another.
  • Step 3 — Differentiate the pieces the rule asks for (often smaller versions of the same problem), applying the Power Rule and Constant Multiple Rule wherever you land on a plain xⁿ term or constant.
  • Step 4 — Assemble the pieces back together exactly as the rule's formula specifies — don't skip the addition in the Product Rule or the subtraction in the Quotient Rule.
  • Step 5 — Simplify: combine like terms, cancel common factors, and rewrite negative or fractional exponents as roots or fractions if that's cleaner.
  • Step 6 — If asked, substitute a specific x-value into the simplified derivative to get the exact slope of the curve at that point.

Worked Example: Product Rule

Find the derivative of f(x) = x²·sin(x). This is a product of u = x² and v = sin(x), so the Product Rule applies: f'(x) = u'v + uv'. Here u' = 2x (Power Rule) and v' = cos(x) (Sine Rule), so f'(x) = 2x·sin(x) + x²·cos(x). At x = 0, this evaluates to 2(0)·sin(0) + 0²·cos(0) = 0 + 0 = 0, meaning the tangent line to x²sin(x) is perfectly flat right at the origin.

Worked Example: Chain Rule

Find the derivative of f(x) = √(x² + 1). Rewrite it as (x² + 1)^(1/2) and apply the Power Rule together with the Chain Rule: bring the 1/2 down, reduce the exponent to -1/2, and multiply by the derivative of the inner expression x² + 1, which is 2x. That gives f'(x) = (1/2)(x² + 1)^(-1/2) · 2x = x / √(x² + 1). At x = 2, this becomes 2 / √5 ≈ 0.894, the exact slope of the curve at that point.

Derivatives and Tangent Lines

The derivative at a point isn't just an abstract number — it's the slope of the line that just barely touches the curve at that one point without crossing through it locally, called the tangent line. Once you know f(a) and f'(a), the tangent line's equation follows directly from the point-slope form: y = f(a) + f'(a)(x − a). This calculator computes exactly that whenever you enter a point, and plots the tangent line right alongside your original function so you can visually confirm the slope matches the steepness of the curve at that spot.

Higher-Order Derivatives and Concavity

Differentiating a derivative gives you a second derivative, written f''(x), which measures how the slope itself is changing — in other words, how the curve is bending. A positive f''(x) means the curve is concave up (bending upward, like a smile), while a negative f''(x) means it's concave down (bending downward, like a frown). Points where f''(x) changes sign are called inflection points. You can find a second derivative simply by differentiating f'(x) a second time using this same calculator, treating the first derivative's result as the new function to differentiate.

Derivatives vs. Limits vs. Integrals

Limits, derivatives, and integrals are the three foundational ideas of calculus. A derivative is itself defined as a limit — the limit of the average rate of change as the interval shrinks to zero — which is why understanding limits comes first. An integral does the reverse job in a sense: while a derivative breaks a function down into its instantaneous rate of change, an integral builds a function back up by accumulating area under a curve, and the Fundamental Theorem of Calculus formally ties differentiation and integration together as inverse operations.

Real-World Applications of Derivatives

Derivatives aren't just a calculus-class exercise — they describe rates of change across nearly every quantitative field:

  • Physics: velocity is the derivative of position, and acceleration is the derivative of velocity.
  • Economics and business: marginal cost and marginal revenue are derivatives of the cost and revenue functions, guiding pricing and production decisions.
  • Engineering: optimizing designs by finding where a derivative equals zero (maximum strength, minimum material, peak efficiency).
  • Medicine and biology: modeling how fast a population, infection, or drug concentration is changing at a given moment.
  • Machine learning: gradient descent, the algorithm behind training most neural networks, relies entirely on derivatives (gradients) to minimize error.
  • Finance: option pricing models like Black-Scholes use derivatives (called "Greeks" in that context) to measure how sensitive a price is to underlying variables.

How to Use This Derivative Calculator

Type your function into the f(x) box using x as the variable — write powers as x², multiplication either with * or just by writing terms next to each other like 2x, and standard function names like sin(x), cos(x), tan(x), sqrt(x), ln(x), log(x), eˣ, and abs(x). Optionally, enter a point in the "Evaluate f'(x) at x =" box to get the exact slope at that x-value along with the tangent line equation.

The calculator instantly shows the simplified derivative f'(x), the slope at your chosen point if you provided one, a two-panel diagram plotting f(x) with its tangent line above f'(x) itself with the matching point marked, and a full step-by-step breakdown — naming every rule used, in the order it was applied — that you can copy with one click for your notes or homework.

Common Mistakes When Finding Derivatives

The most frequent error is forgetting the Chain Rule inside the Power Rule — differentiating (3x + 1)^4 as simply 4(3x+1)^3 without also multiplying by the derivative of the inner expression, 3, gives an answer that's off by a factor of 3. Another common slip is applying the Product Rule's addition where the Quotient Rule's subtraction belongs, or getting the order of terms wrong in the Quotient Rule's numerator, which flips the sign of the final answer. Whenever a derivative problem feels uncertain, this calculator instantly verifies your work with a complete, rule-by-rule solution and a diagram confirming the slope visually.

Frequently Asked Questions

What is a derivative in simple terms?

A derivative tells you how fast a function is changing at one exact point — it's the slope of the tangent line to the curve at that point. If the function represents distance traveled, the derivative represents speed at that instant.

What is the derivative of x^n?

Using the Power Rule, the derivative of xⁿ is n·xⁿ⁻¹ — bring the exponent down as a multiplying coefficient, then subtract 1 from the exponent. For example, the derivative of x^5 is 5x^4.

When do I use the Product Rule vs. the Quotient Rule?

Use the Product Rule when two x-dependent expressions are multiplied together, and the Quotient Rule when one x-dependent expression is divided by another. If only one side of a multiplication or division depends on x, you only need the simpler Constant Multiple Rule instead.

What is the Chain Rule used for?

The Chain Rule differentiates composite functions — one function nested inside another, like sin(x²) or √(3x+1). You differentiate the outer function first, then multiply by the derivative of the inner expression.

How do I find the equation of a tangent line using a derivative?

Compute f(a) and f'(a) at your chosen point, then plug them into the point-slope form: y = f(a) + f'(a)(x − a). f'(a) is the slope of the tangent line, and (a, f(a)) is the point it passes through.

Can this calculator find second derivatives?

Yes — first find f'(x) with this calculator, then paste that result back into the f(x) box and run it again to get f''(x), the second derivative, which describes concavity and inflection points.