Enter a function f(x)
Use x as the variable. Examples: x^2 + 3x - 5, sin(x), ln(x), e^x, (x^2+1)/(x-3).
This free Derivative Calculator helps you find d/dx (the derivative) of a function f(x). It supports common calculus inputs (polynomials, trig, logs, exponentials), shows a clean final result f′(x), and can also compute the derivative at a point (slope at a specific x value). Everything runs in your browser — no signup, no tracking.
Use x as the variable. Examples: x^2 + 3x - 5, sin(x), ln(x), e^x, (x^2+1)/(x-3).
In everyday terms, the derivative tells you how fast something changes. If f(x) is your function, then f′(x) (read “f prime of x”) describes the instantaneous rate of change. In a graph, it’s the slope of the tangent line touching the curve at that point.
There are two closely related ways to think about derivatives:
Formally, the derivative of f(x) at a point x is defined by a limit:
f′(x) = lim(h→0) [f(x+h) − f(x)] / h
The expression [f(x+h) − f(x)] / h is the slope of a secant line (a line through two points on the curve). As h shrinks, the two points get closer together, and the secant line becomes the tangent line. That “tangent slope” is the derivative.
While the definition is beautiful, calculating derivatives from the limit every time would be slow and messy. Instead, calculus gives us shortcut rules that are proven from the limit definition: the power rule, product rule, quotient rule, chain rule, and standard derivatives like d/dx(sin x) = cos x and d/dx(ln x) = 1/x. This calculator applies those rules symbolically when possible. If your input is too complex for symbolic parsing, it falls back to a numeric derivative at a point using a very small h.
Sometimes you don’t need the full derivative function. You just want the slope at a single point, like “what’s the slope of f(x)=x^2 at x=3?” Since f′(x)=2x, we plug in x=3 and get f′(3)=6.
If the calculator can compute f′(x) symbolically, it evaluates it at your x₀. If not, it approximates the slope using the symmetric difference formula:
f′(x₀) ≈ [f(x₀+h) − f(x₀−h)] / (2h)
Symmetric differences tend to be more accurate than forward differences for the same small h. That’s what we use under the hood when you request a numeric slope.
f(x)=x^3 − 4x + 7
f′(x)=3x^2 − 4
f(x)=sin(x^2)
f′(x)=cos(x^2)·2x
f(x)=x^2·ln(x)
f′(x)=2x·ln(x) + x^2·(1/x) = 2x ln(x) + x
f(x)=(x^2+1)/(x−3)
f′(x) = (2x(x−3) − (x^2+1)·1)/(x−3)^2
If f(x)=x^2, then f′(x)=2x. At x=5, f′(5)=10. That means the curve is rising with slope 10 right at x=5.
When you press Calculate Derivative, the calculator tries to compute a symbolic derivative by: (1) converting your input into tokens (numbers, variables, operators, and functions), (2) building an expression tree that represents the math, and (3) applying differentiation rules to that tree. Finally, it turns the result back into a readable formula string.
Symbolic differentiation is great because it produces a general formula, like 3x^2 − 4. However, writing a full computer algebra system in a small web page is tough. So this tool covers the most common cases students use: polynomials, trig/log/exp, and combinations with +, −, ×, ÷, and powers.
If parsing fails (for example, unusual syntax, unsupported functions, or extremely complex expressions), the calculator can still approximate the derivative at a point using numeric differences. Numeric derivatives are extremely useful for quick slope checks, but they depend on choosing a small step size h, and the approximation can become unstable if the function changes wildly or has a discontinuity near your x₀.
d/dx means “differentiate with respect to x.” It’s an operator that turns a function into its derivative. So d/dx(x^2)=2x.
f′(x) is a new function (it outputs a slope for any x). f′(x₀) is one number: the slope at a particular x-value.
Many derivatives are equivalent but simplified differently. For example, 2x·ln(x) + x is the same as x(2 ln(x) + 1). If your result matches after simplification, you’re good.
Not on this page. This calculator focuses on single-variable derivatives in x. (A partial derivative tool would let you choose x, y, or another variable.)
Those can be tricky symbolically. Try numeric mode at a point away from the “corner,” or rewrite your function. For |x|, the derivative is piecewise: −1 for x<0 and +1 for x>0 (undefined at 0).
It’s an approximation. It works well for smooth functions when the step size is small and the function is stable near the point. If you see huge or weird results, try a different x₀ or simplify the expression.
More calculators you might like:
MaximCalculator provides simple, user-friendly tools. Always double-check critical math and consult your instructor’s conventions if needed.