Derivative Calculator

Derivative Calculator. Enter any function into the Derivative Calculator and choose your differentiation variable and derivative order (1st through 5th). You get back the derivative result along with a breakdown of which rules were applied — power rule, chain rule, product rule, and more. Supports polynomials, trigonometric, exponential, and logarithmic functions. Also try the calculate Solution Type, Root / Eigenvalue r₁ & Root / Eigenvalue r₂ — Differential Equation Solver.

Derivative Calculator inputs

Enter the function to differentiate. Use * for multiplication, ^ for powers, and parentheses where needed. Examples: sin(x), e^x, ln(x), x^2*cos(x).

The variable with respect to which differentiation is performed.

How many times to differentiate the function.

Enter a numeric value to evaluate the derivative at a specific point, e.g. f'(2).

Helps identify which differentiation rules apply to your function.

Results

Derivative Result

--

Derivative Expression

--

Value at Given Point

--

Rules Applied

--

Derivative Order

--

Results Table

Type any function into this derivative calculator and you get the derivative back with every rule shown. Whether you need to calculate derivatives for a calculus class or simply derive a quick answer for a project, the working is laid out so students can learn from it, not just copy it. See also our calculate Total Sum (Σ), Number of Terms & First Term Value — Summation (Sigma).

How to Use the Derivative Calculator

Enter your function, choose a letter, and press the button. Every input field accepts standard notation, and a graph of your function appears beside the result. To get the derivative at a point, add the x value you care about, and the derivative of your equation at that value is evaluated for you.

Enter the Function With Parentheses

Write multiplication with a star, or leave out the multiplication sign and let the parser insert it. Use parentheses around anything that should be grouped, such as (x^2+1)/(x-1). Polynomial, rational functions and a square root such as sqrt(x) all work.

Choose the Differentiation Variable

The default variable is x. Change it when your expression uses t or y, because the calculator treats every other letter as a fixed number.

Read the Result and Step-by-Step Solution

The result sits on top, and the step-by-step solution underneath names each rule in order. Use the check answer option to compare your own working with the solution, and look for any simplification the calculator applied at the end.

What a Derivative Means as a Rate of Change

A derivative is the rate of change of one quantity with respect to another. Mathematics defines it through a limit, called the first principle:

$$f'(x) = \lim_{h \to 0} \frac{f(x+h) - f(x)}{h}$$

Leibniz and Newton built this idea independently, and the derivative of a function remains the core tool of calculus. The ratio above is the instantaneous rate of change, and taking the limit as h shrinks is what makes it instantaneous. Many limits can be tested by hand with this formula before you trust a shortcut.

Slope of the Tangent Line

Geometrically, the derivative at a point is the slope of the tangent to the curve there. A positive value means the function is increasing, and a negative value means it is decreasing. A value of zero marks a flat tangent point, often a peak or valley.

Applications in Physics, Economics and Engineering

Velocity is the derivative of position, and acceleration is the derivative of velocity, which is why motion problems lean on derivatives. Economists use the same idea for marginal cost, and engineers rely on it for optimizing a design under constraints.

Derivative Rules Behind Every Differentiation

Each step you see is one of a short list of rules. Learn them once, and a long expression becomes a chain of small moves with a coefficient, a constant and an exponent to track.

Power Rule and Constant Rule

The power rule says the derivative of xn is n times xn-1, so the coefficient 5 is multiplied by the power 3 and the derivative of 5x3 is 15x2. The constant rule sends any fixed number to zero. The sum rule splits sums into separate terms, and the constant multiple rule pulls a coefficient out front.

Product Rule and Quotient Rule

The first rule below handles two functions multiplied together, and the second handles a ratio:

$$\frac{d}{dx}\left[f\,g\right] = f'g + fg', \qquad \frac{d}{dx}\left[\frac{f}{g}\right] = \frac{f'g - fg'}{g^{2}}$$

Chain Rule for a Composite Function

The chain rule differentiates a composite function by taking the outer derivative and multiplying by the inner one. For sin(3x), the inner coefficient 3 becomes the extra factor, giving 3cos(3x). Most errors in homework come from forgetting the inner factor.

Derivative Formulas and a Differentiation Table

Memorising these derivative formulas saves time, and the derivative table below lists the common ones: You might also find our Convolution Output y(n) — Convolution useful.

Function f(x)Derivative f'(x)
sin(x)cos(x)
cos(x)-sin(x)
exex
ln(x)1/x
arctan(x)1/(1+x2)

Hyperbolic functions follow the same pattern with sinh and cosh swapping roles.

Trigonometric and Inverse Trigonometric Derivatives

The derivative of sine is cosine, and the derivative of cosine is negative sine. Inverse versions produce algebraic results, as the arctan row shows.

Exponential and Logarithmic Derivatives

The base e exponential is its own derivative, and the natural logarithm gives 1/x. For an exponent that contains x, like xx, use logarithmic differentiation.

Advanced Differentiation: Higher-Order, Partial and Implicit

Some problems go beyond a single input and one derivative. Multivariable work adds a vector of slopes, and an integral reverses the process when you need the original function.

Higher-Order Derivatives Calculator Settings

Raise the order to 2 for the second derivative, which shows how the rate itself is changing. Each extra order repeats the same rules on the previous answer.

Partial Derivative Calculator and the Gradient Vector

Partial derivatives are taken with respect to one variable and hold the rest fixed. A partial derivative calculator can return both of the partial derivatives of f(x,y), and the gradient magnitude combines them into one steepness value. A mixed partial derivative differentiates once in each variable.

Implicit Differentiation

When y is tangled into the equation, as in x2 + y2 = 25, differentiate both sides and solve for dy/dx. An implicit differentiation calculator automates that algebra, and directional derivatives extend the idea to any chosen direction.

Calculate Derivatives to Test a Bakery's Marginal Cost

Dana runs a small bakery and has a wholesale offer of $17.50 per loaf. The question is whether the 240th loaf of the day still earns money. From her ledger she fits a cubic cost model, C(q) = 0.0004q3 − 0.21q2 + 48q + 1,850, in dollars for q loaves.

That is an economics question about how fast cost climbs, so she types the function into the derivative calculator and reads the steps. The rule for powers on each term returns C'(q) = 0.0012q2 − 0.42q + 48, and the constant 1,850 vanishes because fixed costs do not change with output. As a check answer, she computes the cost gap between 240 and 241 loaves by hand and gets $16.40, close to what the derivative should say.

At q = 240 the result is $16.32 per loaf. That is below the $17.50 offer, so one more loaf adds $1.18 of margin. The derivative calculation also gives the second derivative, C''(q) = 0.0024q − 0.42, which is 0.156 at 240, so marginal cost is increasing.

Loaves qMarginal cost C'(q)Against $17.50
100$18.00loses $0.50 per loaf
240$16.32earns $1.18 per loaf
260$19.92loses $2.42 per loaf

Setting the tool's output C'(q) equal to 17.50 and solving puts the breakeven points at about 103 and 247 loaves, so the window is narrower than it first looks. The number to watch is 247, because optimizing past it turns every extra loaf into a loss. One caveat: a derivative is exact for the formula, but the fitted polynomial is only trustworthy near the volumes in her ledger, so she will not extrapolate to 400 loaves. Reading the derivative at each volume is what tells her to cap the contract at 245 loaves a day.

How Symbolic Differentiation Works Inside the Tool

First, a parser reads your text and builds an expression tree, respecting the order of operations. The tree is passed to a computer algebra system such as Maxima, which applies the rules above and simplifies. The output is converted to LaTeX for display, and each derivative calculation is repeated step by step so the rules can be shown. A derivative solver handles the quotient and chain cases the same way.

Worked Example: How to Differentiate a Product

Let f(x) = x4e2x. This is a product, so apply the product rule with u = x4 and v = e2x:

$$f'(x) = 4x^{3}e^{2x} + 2x^{4}e^{2x} = 2x^{3}e^{2x}(2 + x)$$

StepValue at x = 1.5
f(1.5)101.683
First term, 4x3e2x271.155
Second term, 2x4e2x203.366
f'(1.5)474.521

Enter the function as the input and set the point x = 1.5. At that point the function is rising at about 474.5 units per unit of x. Check out our Integral Calculator as well.