Derivative Calculator

Enter any function of x to find its derivative symbolically. Optionally evaluate the derivative at a specific point to find the instantaneous rate of change or slope of the tangent line.

Report a Bug

What Derivatives Actually Measure

A derivative tells you how fast something is changing at one specific instant. That's it — that's the core idea, and everything else in differential calculus flows from it. If you've ever glanced at a car's speedometer, you've read a derivative. The speedometer doesn't show your average speed over the last hour. It shows your rate of change of position right now, at this exact moment.

Formally, the derivative of f(x) at a point x = a is defined as the limit of [f(a+h) - f(a)] / h as h shrinks to zero. That fraction is the slope of a line connecting two points on the curve, and as h gets tinier, that line rotates until it becomes the tangent line — the line that just barely touches the curve at a single point. The slope of this tangent line is the derivative.

Newton called it "fluxion." Leibniz wrote it as dy/dx. Modern notation uses f'(x) or df/dx. They all mean the same thing: the instantaneous rate of change of f with respect to x.

Here's a concrete example that makes it click. Suppose your position is described by f(t) = t² meters, where t is time in seconds. At t = 3, you're at position 9 meters. But how fast are you moving? The derivative f'(t) = 2t gives f'(3) = 6 meters per second. That's your velocity at exactly t = 3. One second later at t = 4, your velocity has increased to f'(4) = 8 m/s. The fact that velocity itself is changing means there's acceleration — which is just the derivative of velocity, or the second derivative of position.

Basic Differentiation Rules

You could compute every derivative from the limit definition, but that would be like doing long division every time you need to split a restaurant bill. The rules of differentiation are shortcuts that have been proven to always work, and they let you find derivatives almost instantly once you've memorized a handful of patterns.

The power rule handles polynomials and is the one you'll use most. If f(x) = x^n, then f'(x) = n*x^(n-1). Drop the exponent down as a coefficient, then reduce the exponent by one. So the derivative of x³ is 3x². The derivative of x¹ (just x) is 1. The derivative of x⁰ (a constant) is 0. That last one makes intuitive sense: a constant doesn't change, so its rate of change is zero.

The constant multiple rule says you can pull coefficients out front. The derivative of 5x³ is 5 times the derivative of x³, which gives 5 * 3x² = 15x². The sum rule says the derivative of a sum equals the sum of the derivatives. So d/dx(x³ + 2x) = 3x² + 2. You just differentiate each piece separately.

Trig derivatives come in pairs. The derivative of sin(x) is cos(x), and the derivative of cos(x) is -sin(x). That negative sign is easy to forget, and it's caused more lost exam points than probably any other single fact in calculus. A good way to remember: starting with sin, each derivative cycles through cos, -sin, -cos, sin, and repeats.

The exponential function e^x has a remarkable property: it's its own derivative. No matter how many times you differentiate e^x, you always get e^x back. The natural log function ln(x) has the derivative 1/x, which connects logarithms back to the algebraic world of rational functions.

The Chain Rule and Product Rule

Once you move beyond simple functions, you'll run into compositions (functions inside functions) and products (functions multiplied together). Two rules handle these situations, and they're essential for any serious calculus work.

The chain rule deals with compositions. If you have f(g(x)), the derivative is f'(g(x)) * g'(x). In plain language: differentiate the outer function, leave the inner function alone, then multiply by the derivative of the inner function. For example, the derivative of sin(3x) is cos(3x) * 3. The outer function is sin, its derivative is cos, the inner function 3x stays put, and you multiply by the derivative of 3x, which is 3.

Another example: the derivative of (x² + 1)^5 is 5*(x² + 1)^4 * 2x = 10x*(x² + 1)^4. Power rule on the outside, chain rule brings the inner derivative 2x along for the ride.

The product rule handles multiplication. If f(x) = u(x) * v(x), then f'(x) = u'(x)*v(x) + u(x)*v'(x). First times derivative of second, plus second times derivative of first. For x² * sin(x), that gives 2x*sin(x) + x²*cos(x).

The quotient rule is technically a third rule for divisions, but you can always rewrite a quotient as a product and use the product rule instead. Still, the quotient rule formula is handy: for f/g, the derivative is (f'g - fg') / g². "Low dee high minus high dee low, over the square of what's below" is the classic mnemonic.

This calculator handles basic symbolic differentiation using the power rule, trig rules, and exponential/log rules. For complex expressions, it also provides numerical differentiation as a reliable fallback.

Derivatives in Everyday Life

Derivatives aren't just a math class topic you endure and forget. They describe how nearly everything in the real world changes, and people use them constantly without necessarily writing out the formulas.

In medicine, the rate at which a drug concentration changes in your bloodstream is a derivative. Pharmacologists model drug absorption and elimination using differential equations. When your doctor says a medication has a "half-life" of 6 hours, they're describing the decay rate — a derivative — of drug concentration over time. Dosing schedules are designed to keep the drug's concentration within a therapeutic window, and that requires understanding how quickly levels rise and fall.

In economics, marginal cost and marginal revenue are derivatives. The marginal cost is the derivative of the total cost function with respect to quantity — it tells you how much it costs to produce one additional unit. A company maximizes profit where marginal revenue equals marginal cost, which is a calculus optimization problem. Even if an economist never writes down a derivative symbol, the underlying concept drives pricing decisions across entire industries.

Climate scientists use derivatives to measure rates of change in temperature, sea level, and ice coverage. When a report says the rate of Arctic ice loss is accelerating, that's a statement about the second derivative — not only is ice decreasing (negative first derivative), but it's decreasing faster each year (negative second derivative).

And then there's machine learning, which has brought derivatives into the tech spotlight. Neural networks learn by computing gradients — multivariable derivatives — and adjusting millions of parameters to minimize error. Every time you use a voice assistant, image recognition, or a language model, there are billions of derivatives being calculated behind the scenes during the training process. The backpropagation algorithm, which is essentially the chain rule applied systematically through layers of a network, is arguably the most economically impactful application of calculus in the 21st century.

Derivative Definition and Rules

f'(x) = lim(h→0) [f(x+h) - f(x)] / h

The derivative of a function measures its instantaneous rate of change. It's defined as the limit of the difference quotient as h approaches zero. In practice, we use differentiation rules instead of computing limits directly. The power rule states that the derivative of x^n is n*x^(n-1). For trigonometric functions, the derivative of sin(x) is cos(x) and the derivative of cos(x) is -sin(x). The exponential function e^x is its own derivative, and the derivative of ln(x) is 1/x.

Where:

  • f(x) = The original function to differentiate
  • f'(x) = The derivative (also written as dy/dx or df/dx)
  • h = An infinitesimally small increment approaching zero

Example Calculations

Derivative of a Polynomial

Finding the derivative of x³ and evaluating it at x = 2.

Using the power rule: d/dx(x³) = 3x². At x = 2, f'(2) = 3*(2)² = 3*4 = 12. This means the function x³ is changing at a rate of 12 units per unit of x when x equals 2. The tangent line at that point has slope 12.

Derivative of sin(x)

Differentiating the sine function and evaluating at x = 0.

The derivative of sin(x) is cos(x). At x = 0, f'(0) = cos(0) = 1. This confirms that the sine function has its steepest upward slope at the origin, where the tangent line has a slope of exactly 1.

Frequently Asked Questions

The derivative f'(x) is a function that gives the rate of change at any point. The differential dy is a related but distinct concept: dy = f'(x) * dx, where dx is a small change in x. The differential approximates how much y changes when x changes by a small amount dx. In everyday calculus, you'll mostly work with derivatives. Differentials become important in multivariable calculus, differential equations, and error approximation.

A constant function, like f(x) = 5, outputs the same value regardless of x. Since it never changes, its rate of change is zero everywhere. Graphically, a constant function is a horizontal line, and horizontal lines have zero slope. This is consistent with the power rule: treating 5 as 5x⁰, the derivative is 5*0*x^(-1) = 0.

This calculator symbolically differentiates polynomials and power functions (x^n), basic trigonometric functions (sin(x) and cos(x)), the exponential function (e^x), and the natural logarithm (ln(x)). It also handles sums and differences of these functions, as well as constant multiples. For functions it can't differentiate symbolically, it falls back to numerical differentiation using the central difference formula, which provides accurate results for evaluating the derivative at any specific point.

When symbolic rules don't apply, the calculator uses the central difference formula: f'(x) is approximately equal to [f(x+h) - f(x-h)] / (2h), where h is a very small number (typically 0.00001). This formula estimates the slope by computing the rise over run between two points very close to x, one slightly above and one slightly below. It's more accurate than the one-sided difference [f(x+h) - f(x)] / h because errors cancel out symmetrically.

This calculator computes the first derivative. To find the second derivative, you can take the output (the first derivative expression) and enter it as a new input. For example, if f(x) = x³ gives f'(x) = 3x², enter 3*x^2 to get f''(x) = 6x. Repeat the process for third or higher derivatives. The second derivative tells you about acceleration or concavity, while the third derivative (called jerk in physics) describes the rate of change of acceleration.

Related Calculators