Skip to content
Explore tools

Calculus

Derivative Calculator: Differentiate Any Function With Steps

Last updated: October 2026

A derivative calculator finds the derivative of a function, which tells you how fast the function changes at each point. It is the slope of the tangent line. For example, the derivative of x² is 2x, and the derivative of sin(x) is cos(x). The calculator applies the power, product, quotient and chain rules step by step.

  • Free, no sign-up
  • Shows the working
  • Runs on your device

Calculus

Derivative Calculator

A polynomial derivative with steps, the slope at a point, or the second derivative. This is school algebra, not a full calculus system.

Result

—

Derivatives are the first big idea in calculus. They measure change: speed from position, growth rate from population, marginal cost from total cost. This guide covers what a derivative means, every rule you need, special cases like implicit and partial derivatives, and how to use derivatives to solve real problems. Every result was checked with the SymPy computer algebra system.

Note: Calc Solver (calc-solver.co) is an independent guide site and is not affiliated with any calculator mentioned here.

What A Derivative Is

A derivative measures the instant rate of change of a function. On a graph, it is the slope of the tangent line, the straight line that just touches the curve at one point.

Think of driving. Your position changes over time, and your speedometer shows how fast it is changing right now. Speed is the derivative of position. If position is s(t), then speed is s′(t).

The derivative of a function is itself a function. For f(x) = x², the derivative is f′(x) = 2x. At x = 3, the slope is 6. At x = −1, it is −2, which means the curve is going down there.

Derivative Notation

You will see several ways to write the same derivative. They come from different mathematicians, and textbooks mix them freely.

NotationRead asNamed afterExample
f′(x)"f prime of x"LagrangeIf f(x) = x², f′(x) = 2x
dy/dx"dee y dee x"LeibnizIf y = x², dy/dx = 2x
d/dx [f(x)]"the derivative of f(x)"Leibnizd/dx [x²] = 2x
ẏ"y dot"NewtonUsed for time derivatives in physics

Calculus was developed separately by Isaac Newton, starting in 1665, and Gottfried Leibniz, around 1673. Leibniz introduced the dy/dx notation still used today, according to the University of Houston's Engines of Our Ingenuity.

The Limit Definition Of A Derivative

Formally, the derivative is a limit. It finds the slope between two points on the curve, then slides the points together until the gap h shrinks to zero:

f′(x) = lim (h → 0) [f(x + h) − f(x)] / h

For f(x) = x²:

  1. f(x + h) = x² + 2xh + h².
  2. Subtract f(x): 2xh + h².
  3. Divide by h: 2x + h.
  4. Let h go to 0: f′(x) = 2x.

This always works, but it is slow. The rules in the next sections are shortcuts proven from this definition. Paul's Online Math Notes at Lamar University works through more limit-definition examples.

How To Use The Derivative Calculator

The derivative calculator above handles ordinary, higher-order, implicit and partial derivatives. It takes three steps:

  1. Pick a tab. Use Derivative for most problems, Partial Derivative for functions of several variables, or Tangent Line at a Point for a slope at a specific x.
  2. Type the function. Use ^ for powers and * for multiplication: x^2*sin(x), e^(x^2+2x), ln(3t+5), sqrt(x).
  3. Set the order. Choose 1 for f′(x), 2 for f″(x), and so on.

Each step names the rule it used, so you can follow the same path on paper.

Basic Derivative Rules

These rules cover single functions. Combine them with the product, quotient and chain rules below to handle almost anything.

FunctionDerivativeNote
c (a constant)0Flat lines have zero slope
x1
xⁿn·xⁿ⁻¹Power rule, works for any real n
√x1/(2√x)Power rule with n = ½
1/x−1/x²Power rule with n = −1
eˣeˣIts own derivative
aˣaˣ·ln(a)d/dx 2ˣ = 2ˣ·ln 2
ln(x)1/x
logₐ(x)1/(x·ln a)
sin(x)cos(x)
cos(x)−sin(x)Watch the minus sign
tan(x)sec²(x)
sec(x)sec(x)·tan(x)
csc(x)−csc(x)·cot(x)
cot(x)−csc²(x)
arcsin(x)1/√(1 − x²)
arctan(x)1/(1 + x²)

Two more rules let you work term by term. The sum rule says the derivative of a sum is the sum of the derivatives. The constant multiple rule says numbers in front just come along.

Example: d/dx (4x³ − 5x + 9) = 12x² − 5. Each term uses the power rule, and the constant 9 disappears.

The power rule works for negative and fractional powers too. Rewrite roots and fractions as powers first: 1/x³ = x⁻³, so its derivative is −3x⁻⁴ = −3/x⁴.

The Product Rule

Use the product rule when two functions are multiplied together. The rule is (fg)′ = f′g + fg′: derivative of the first times the second, plus the first times the derivative of the second.

Find the derivative of x²·sin(x):

  1. f = x², so f′ = 2x.
  2. g = sin(x), so g′ = cos(x).
  3. Combine: 2x·sin(x) + x²·cos(x).

You cannot just multiply the two derivatives. That would give 2x·cos(x), which is wrong.

The Quotient Rule

Use the quotient rule when one function is divided by another. The rule is (f/g)′ = (f′g − fg′) / g². A memory trick is "low d-high minus high d-low, over the square of what's below."

Find the derivative of (x² + 1)/(x − 1):

  1. Top: f = x² + 1, f′ = 2x.
  2. Bottom: g = x − 1, g′ = 1.
  3. Apply: [2x(x − 1) − (x² + 1)(1)] / (x − 1)².
  4. Simplify the top: 2x² − 2x − x² − 1 = x² − 2x − 1.
  5. Result: (x² − 2x − 1)/(x − 1)².

The order of the top matters. Writing fg′ − f′g gives the right answer with the wrong sign.

The Chain Rule

Use the chain rule for a function inside another function, like sin(3x²) or (2x + 1)⁵. The rule is: derivative of the outside, keeping the inside the same, times the derivative of the inside.

FunctionOutsideInsideDerivative
sin(3x²)sin(u)u = 3x²cos(3x²)·6x = 6x·cos(3x²)
(2x + 1)⁵u⁵u = 2x + 15(2x + 1)⁴·2 = 10(2x + 1)⁴
e^(x² + 2x)eᵘu = x² + 2x(2x + 2)·e^(x² + 2x)
ln(3t + 5)ln(u)u = 3t + 53/(3t + 5)
√(x² + 1)√uu = x² + 1x/√(x² + 1)

The most common chain rule mistake is forgetting the "times the inside" part. The derivative of sin(3x²) is not cos(3x²). The 6x from the inside is easy to drop.

For layered functions, keep peeling. The derivative of sin(e^(2x)) is cos(e^(2x))·e^(2x)·2, one factor for each layer.

Higher-Order Derivatives

A higher-order derivative is the derivative of a derivative. The second derivative, f″(x), tells you how the slope itself is changing, which shows whether a curve bends up or down.

For f(x) = x⁴ − 3x²:

The second derivative tells you the concavity. Where f″(x) is positive, the curve is concave up, shaped like a cup. Where it is negative, the curve is concave down, shaped like a cap. Points where the concavity changes are called inflection points.

In physics, the chain goes position, velocity, acceleration. If a particle's position is s(t) = t³ − 6t² + 9t, its velocity is v(t) = 3t² − 12t + 9 and its acceleration is a(t) = 6t − 12. The particle stops moving when v(t) = 0, at t = 1 and t = 3.

Implicit Differentiation

Implicit differentiation finds dy/dx when x and y are mixed together in an equation, so you cannot easily solve for y first. Differentiate both sides with respect to x, and multiply by dy/dx every time you differentiate a y term.

For the circle x² + y² = 25:

  1. Differentiate both sides: 2x + 2y·(dy/dx) = 0.
  2. Move the x term: 2y·(dy/dx) = −2x.
  3. Solve: dy/dx = −x/y.

At the point (3, 4) on the circle, the slope is −3/4. At (3, −4), it is +3/4. The answer depends on both x and y, which is normal for implicit derivatives.

Partial Derivatives

A partial derivative measures how a function of several variables changes when only one variable moves. You hold all the other variables constant and treat them like numbers.

For f(x, y) = x²y + 3xy³:

Partial derivativeTreat as constantResult
∂f/∂xy2xy + 3y³
∂f/∂yxx² + 9xy²
∂²f/∂x∂yTake ∂/∂y of ∂f/∂x2x + 9y²

The mixed partial gives the same answer in either order, ∂/∂x of ∂f/∂y or ∂/∂y of ∂f/∂x, for smooth functions like this one. That is a quick check on your work.

Partial derivatives are used in multivariable calculus, economics (how profit changes with price while cost stays fixed) and machine learning, where gradient descent uses them to adjust a model.

Logarithmic Differentiation

Logarithmic differentiation handles functions with a variable in both the base and the exponent, like xˣ. Neither the power rule nor the exponential rule applies to those directly.

Find the derivative of y = xˣ:

  1. Take ln of both sides: ln(y) = x·ln(x).
  2. Differentiate: (1/y)·y′ = ln(x) + 1.
  3. Multiply by y: y′ = y(ln x + 1).
  4. Substitute back: y′ = xˣ(ln x + 1).

This trick also simplifies long products and quotients, because logs turn multiplication into addition.

Derivative At A Point And The Tangent Line

To find the slope at one point, find the derivative first, then plug in the x-value. The tangent line at x = a is y = f′(a)(x − a) + f(a).

For f(x) = x³ − 2x at x = 2:

  1. f′(x) = 3x² − 2, so f′(2) = 12 − 2 = 10. That is the slope.
  2. f(2) = 8 − 4 = 4. The point is (2, 4).
  3. Tangent line: y = 10(x − 2) + 4, which simplifies to y = 10x − 16.

The tangent line is a good local estimate. Near x = 2, the curve and the line are almost the same, which is the idea behind linear approximation.

Using Derivatives To Find Maximum And Minimum Values

Derivatives find the highest and lowest points of a function. At a peak or valley, the tangent line is flat, so the derivative is zero. These points are called critical points.

Find the local max and min of f(x) = x³ − 3x:

  1. f′(x) = 3x² − 3.
  2. Set it to zero: 3x² − 3 = 0, so x = −1 or x = 1. The equation solver can solve f′(x) = 0 for harder functions.
  3. Use the second derivative, f″(x) = 6x. At x = −1, f″ = −6, which is concave down, so it is a local maximum. At x = 1, f″ = 6, which is concave up, so it is a local minimum.
  4. Plug in: f(−1) = 2 and f(1) = −2.

The sign of f′(x) between critical points also shows where the function rises and falls. For x³ − 3x, test a number in each interval: f′(−2) = 9 is positive, f′(0) = −3 is negative and f′(2) = 9 is positive. So the function increases for x < −1, decreases between −1 and 1, and increases again for x > 1. This is called the first derivative test, and it confirms the max and min without the second derivative.

This is the core of optimization. Say you have 400 feet of fence to make a rectangle along a river, with no fence on the river side. With width x, the area is A = x(400 − 2x). Then A′ = 400 − 4x = 0 gives x = 100. The best pen is 100 by 200 feet, for 20,000 square feet.

Related rates problems ask how fast one quantity changes when you know how fast a connected quantity changes. You write an equation linking them, then differentiate both sides with respect to time.

A 10-foot ladder leans against a wall. The bottom slides away from the wall at 2 feet per second. How fast is the top sliding down when the bottom is 6 feet from the wall?

  1. Let x be the distance from the wall to the bottom and y the height of the top. Then x² + y² = 100.
  2. Differentiate with respect to time t: 2x·(dx/dt) + 2y·(dy/dt) = 0.
  3. When x = 6, the height is y = √(100 − 36) = 8.
  4. Plug in dx/dt = 2: 2(6)(2) + 2(8)(dy/dt) = 0, so dy/dt = −24/16 = −1.5 feet per second.

The negative sign means the top is moving down. The key habit is to plug in numbers only after you differentiate. If you plug in x = 6 first, it becomes a constant and its rate disappears.

Linear Approximation

The tangent line gives a quick estimate of a function near a known point. This is called linear approximation: f(x) ≈ f(a) + f′(a)(x − a) when x is close to a.

Estimate √4.1 without a calculator:

  1. Use f(x) = √x and the nearby easy point a = 4, where f(4) = 2.
  2. The derivative is f′(x) = 1/(2√x), so f′(4) = 1/4.
  3. Estimate: √4.1 ≈ 2 + (1/4)(0.1) = 2.025.

The true value is about 2.02485, so the estimate is off by less than 0.0002. Engineers use the same idea to simplify formulas near a known operating point.

Using Derivatives To Evaluate Limits (L'HôPital's Rule)

L'Hôpital's rule uses derivatives to solve limits that come out as 0/0 or ∞/∞. If plugging in gives one of those forms, take the derivative of the top and the bottom separately, then try the limit again.

LimitPlugging in givesAfter L'HôpitalAnswer
lim (x → 0) sin(x)/x0/0cos(x)/11
lim (x → 2) (x² − 4)/(x − 2)0/02x/14
lim (x → 0) (eˣ − 1)/x0/0eˣ/11

This is not the quotient rule. You differentiate the top and bottom on their own, not the fraction as a whole. And it only applies to 0/0 or ∞/∞ forms. Using it on anything else gives wrong answers.

Real-World Uses Of Derivatives

Any time you see "rate," "per," or "how fast," a derivative is usually involved.

When A Derivative Does Not Exist

A function has no derivative at points where it has no single clear slope. A calculator may return an error or "undefined" at these points, and that is the correct result.

CaseExampleWhy
Sharp corner|x| at x = 0The slope is −1 on the left and +1 on the right
Cuspx^(2/3) at x = 0The slopes shoot to −∞ and +∞ from each side
Vertical tangent∛x at x = 0The slope is infinite
Jump or holeA step function at the jumpThe function is not continuous there

A function must be continuous at a point to have a derivative there. But continuity alone is not enough, as |x| shows. It is continuous at 0 but not differentiable.

How To Check A Derivative

You can check any derivative with a quick number test. Pick an x-value and compute the slope between two very close points:

slope ≈ [f(x + 0.001) − f(x − 0.001)] / 0.002

For f(x) = x³ − 2x at x = 2, this gives about 10.000001. The exact derivative at that point is 10, so the answer checks out.

On a TI-84, press MATH and choose 8: nDeriv( to get the same kind of numerical slope at a point. It gives a decimal, not a formula. For limits, integrals and derivatives in one place, the calculus solver shows full steps. To go the other way and find an antiderivative, use the integral calculator.

Common Derivative Mistakes

Most derivative errors come from skipping one part of a rule, not from choosing the wrong rule.

MistakeExampleFix
Forgetting the chain ruled/dx sin(3x²) = cos(3x²)Multiply by the inside's derivative: 6x·cos(3x²)
Multiplying derivatives for a productd/dx (x²·sin x) = 2x·cos xUse the product rule: 2x·sin x + x²·cos x
Flipping the quotient rule top(fg′ − f′g)/g²It is (f′g − fg′)/g²
Sign error with cosined/dx cos x = sin x−sin x
Treating eˣ like a powerd/dx eˣ = x·eˣ⁻¹d/dx eˣ = eˣ
Power rule on xˣd/dx xˣ = x·xˣ⁻¹Use logarithmic differentiation
Forgetting dy/dx on y termsd/dx (y²) = 2y2y·(dy/dx) in implicit problems

Summary

Next step: enter your function in the derivative calculator at the top of this page. For more math tools, visit the Calc Solver homepage.

Frequently Asked Questions

What is the derivative of x?

The derivative of x is 1. The line y = x rises 1 unit for every 1 unit it moves right, so its slope is always 1. You can also get it from the power rule: x is x¹, so the derivative is 1·x⁰ = 1. For any line y = mx + b, the derivative is just the slope m.

Can a derivative be negative?

Yes. A negative derivative means the function is going down at that point. For f(x) = x², the derivative 2x is negative for every x less than 0, which is where the parabola falls from left to right. A derivative of zero means a flat spot, and a positive derivative means the function is rising.

What is the difference between a derivative and an antiderivative?

They are opposite operations. A derivative takes a function and gives its rate of change, like d/dx (x²) = 2x. An antiderivative goes backward, finding a function whose derivative you already know: the antiderivative of 2x is x² + C. The + C appears because any constant disappears when you take a derivative.

Why is the derivative of a constant zero?

A constant function, like f(x) = 7, never changes, so its rate of change is zero everywhere. On a graph, it is a flat horizontal line with a slope of 0. With the limit definition, f(x + h) − f(x) = 7 − 7 = 0, so the whole fraction is 0 for every h.

Is dy/dx a fraction?

Not exactly, though it often behaves like one. Leibniz wrote dy/dx to suggest a tiny change in y divided by a tiny change in x, and that picture helps with the chain rule and u-substitution. Formally, though, dy/dx is a limit, not a fraction of two numbers. Treating it like a fraction works in most first-year calculus problems, but it can fail with partial derivatives.

Do I need to simplify my derivative?

It depends on what you will use it for. A correct but unsimplified derivative is still right, and many teachers accept it. But simplifying helps when you need to set the derivative equal to zero, find its sign or take another derivative. Factoring is usually the most useful form, like 3(t − 1)(t − 3) instead of 3t² − 12t + 9.

Try it with your own numbers

Use a free CalcSolver tool to check the examples in this guide.

Back to the calculus guide