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
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.
| Notation | Read as | Named after | Example |
|---|---|---|---|
| f′(x) | "f prime of x" | Lagrange | If f(x) = x², f′(x) = 2x |
| dy/dx | "dee y dee x" | Leibniz | If y = x², dy/dx = 2x |
| d/dx [f(x)] | "the derivative of f(x)" | Leibniz | d/dx [x²] = 2x |
| ẏ | "y dot" | Newton | Used 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²:
- f(x + h) = x² + 2xh + h².
- Subtract f(x): 2xh + h².
- Divide by h: 2x + h.
- 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:
- 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.
- Type the function. Use ^ for powers and * for multiplication: x^2*sin(x), e^(x^2+2x), ln(3t+5), sqrt(x).
- 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.
| Function | Derivative | Note |
|---|---|---|
| c (a constant) | 0 | Flat lines have zero slope |
| x | 1 | |
| xⁿ | n·xⁿ⁻¹ | Power rule, works for any real n |
| √x | 1/(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):
- f = x², so f′ = 2x.
- g = sin(x), so g′ = cos(x).
- 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):
- Top: f = x² + 1, f′ = 2x.
- Bottom: g = x − 1, g′ = 1.
- Apply: [2x(x − 1) − (x² + 1)(1)] / (x − 1)².
- Simplify the top: 2x² − 2x − x² − 1 = x² − 2x − 1.
- 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.
| Function | Outside | Inside | Derivative |
|---|---|---|---|
| sin(3x²) | sin(u) | u = 3x² | cos(3x²)·6x = 6x·cos(3x²) |
| (2x + 1)⁵ | u⁵ | u = 2x + 1 | 5(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 + 5 | 3/(3t + 5) |
| √(x² + 1) | √u | u = x² + 1 | x/√(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²:
- First derivative: f′(x) = 4x³ − 6x
- Second derivative: f″(x) = 12x² − 6
- Third derivative: f‴(x) = 24x
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:
- Differentiate both sides: 2x + 2y·(dy/dx) = 0.
- Move the x term: 2y·(dy/dx) = −2x.
- 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 derivative | Treat as constant | Result |
|---|---|---|
| ∂f/∂x | y | 2xy + 3y³ |
| ∂f/∂y | x | x² + 9xy² |
| ∂²f/∂x∂y | Take ∂/∂y of ∂f/∂x | 2x + 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ˣ:
- Take ln of both sides: ln(y) = x·ln(x).
- Differentiate: (1/y)·y′ = ln(x) + 1.
- Multiply by y: y′ = y(ln x + 1).
- 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:
- f′(x) = 3x² − 2, so f′(2) = 12 − 2 = 10. That is the slope.
- f(2) = 8 − 4 = 4. The point is (2, 4).
- 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:
- f′(x) = 3x² − 3.
- Set it to zero: 3x² − 3 = 0, so x = −1 or x = 1. The equation solver can solve f′(x) = 0 for harder functions.
- 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.
- 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
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?
- Let x be the distance from the wall to the bottom and y the height of the top. Then x² + y² = 100.
- Differentiate with respect to time t: 2x·(dx/dt) + 2y·(dy/dt) = 0.
- When x = 6, the height is y = √(100 − 36) = 8.
- 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:
- Use f(x) = √x and the nearby easy point a = 4, where f(4) = 2.
- The derivative is f′(x) = 1/(2√x), so f′(4) = 1/4.
- 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.
| Limit | Plugging in gives | After L'Hôpital | Answer |
|---|---|---|---|
| lim (x → 0) sin(x)/x | 0/0 | cos(x)/1 | 1 |
| lim (x → 2) (x² − 4)/(x − 2) | 0/0 | 2x/1 | 4 |
| lim (x → 0) (eˣ − 1)/x | 0/0 | eˣ/1 | 1 |
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.
- Physics: velocity is the derivative of position, and acceleration is the derivative of velocity.
- Economics: marginal cost is the derivative of total cost. If C(x) = 0.01x² + 5x + 200 dollars for x units, then C′(x) = 0.02x + 5, and C′(100) = $7. The 101st unit costs about $7 to make.
- Biology and finance: growth rate is the derivative of size over time. If a population is P(t) = 500e^(0.03t), its growth rate is P′(t) = 15e^(0.03t). At t = 10 years, that is about 20.2 individuals per year.
- Engineering: the slope of a road profile or the stress change along a beam are derivatives.
- Machine learning: training a model uses partial derivatives to decide which way to adjust each weight.
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.
| Case | Example | Why |
|---|---|---|
| Sharp corner | |x| at x = 0 | The slope is −1 on the left and +1 on the right |
| Cusp | x^(2/3) at x = 0 | The slopes shoot to −∞ and +∞ from each side |
| Vertical tangent | ∛x at x = 0 | The slope is infinite |
| Jump or hole | A step function at the jump | The 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.
| Mistake | Example | Fix |
|---|---|---|
| Forgetting the chain rule | d/dx sin(3x²) = cos(3x²) | Multiply by the inside's derivative: 6x·cos(3x²) |
| Multiplying derivatives for a product | d/dx (x²·sin x) = 2x·cos x | Use 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 cosine | d/dx cos x = sin x | −sin x |
| Treating eˣ like a power | d/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 terms | d/dx (y²) = 2y | 2y·(dy/dx) in implicit problems |
Summary
- A derivative is the instant rate of change of a function and the slope of its tangent line.
- The power rule, exponential, log and trig rules cover single functions. The product, quotient and chain rules combine them.
- The second derivative shows concavity. Implicit, partial and logarithmic differentiation handle special cases.
- Set f′(x) = 0 to find critical points, then use f″(x) to tell maximums from minimums.
- Check any answer with a numerical slope test at one point.
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.