MaximCalculator Free, fun & accurate calculators
📈 Platinum math layout
🌙Dark Mode

Derivative Calculator

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.

Fast derivative (symbolic + numeric fallback)
🧠Rule-based steps you can learn from
📌Derivative at a point (slope) option
📱Perfect for screenshots & sharing

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).

f(x)=
🎛️
x₀
Your derivative result will appear here
Enter a function and tap “Calculate Derivative”.
Tip: use parentheses and write powers like x^2. Functions supported: sin, cos, tan, ln, log, exp, sqrt.

This calculator is for learning and checking work. For graded assignments, show your steps and confirm domain restrictions (e.g., ln(x) requires x > 0 in real numbers).

📚 Formula + intuition

What is a derivative?

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:

  • As a slope: If you zoom in on a smooth curve, it starts looking like a straight line. The derivative gives the slope of that “zoomed in” line.
  • As a rate: If x is time and f(x) is distance, then f′(x) is velocity. If f(x) is velocity, then f′(x) is acceleration.
The core definition (limit)

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.

Why calculators use rules (not raw limits)

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.

Most-used derivative rules (cheat sheet)
  • Constant rule: d/dx(c) = 0
  • Power rule: d/dx(x^n) = n·x^(n−1)
  • Constant multiple: d/dx(c·f) = c·f′
  • Sum rule: d/dx(f + g) = f′ + g′
  • Product rule: d/dx(f·g) = f′·g + f·g′
  • Quotient rule: d/dx(f/g) = (f′·g − f·g′)/g^2
  • Chain rule: d/dx(f(g(x))) = f′(g(x))·g′(x)
Common derivatives
  • Trig: d/dx(sin x)=cos x, d/dx(cos x)=−sin x, d/dx(tan x)=sec^2 x
  • Exponentials: d/dx(e^x)=e^x, d/dx(a^x)=a^x ln(a)
  • Logs: d/dx(ln x)=1/x, d/dx(log(x))=1/(x ln 10)
  • Square root: d/dx(sqrt(x)) = 1/(2 sqrt(x))
Derivative at a point (slope number)

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.

🧪 Examples

Derivative examples (with quick reasoning)

Example 1: Polynomial

f(x)=x^3 − 4x + 7

  • Power rule: derivative of x^3 is 3x^2
  • Derivative of −4x is −4
  • Derivative of constant 7 is 0

f′(x)=3x^2 − 4

Example 2: Chain rule

f(x)=sin(x^2)

  • Outer: sin(u) → derivative is cos(u)
  • Inner: u=x^2 → derivative is 2x
  • Chain rule: multiply them

f′(x)=cos(x^2)·2x

Example 3: Product rule

f(x)=x^2·ln(x)

  • Let f=x^2, g=ln(x)
  • f′=2x, g′=1/x
  • Product rule: f′g + fg′

f′(x)=2x·ln(x) + x^2·(1/x) = 2x ln(x) + x

Example 4: Quotient rule

f(x)=(x^2+1)/(x−3)

  • Top u=x^2+1, bottom v=x−3
  • u′=2x, v′=1
  • Quotient: (u′v − uv′)/v^2

f′(x) = (2x(x−3) − (x^2+1)·1)/(x−3)^2

Example 5: Derivative at a point

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.

🧩 How this calculator works

Behind the scenes (symbolic + numeric)

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₀.

Practical advice (viral + useful)
  • Use it to check homework: Do your steps first, then compare your final derivative here.
  • Study smarter: Load examples, then tweak one piece at a time and see how the derivative changes.
  • Make it a “slope game”: Pick random functions, guess the derivative shape, then verify.
  • Share-friendly: The copy/share buttons generate a clean “f(x) → f′(x)” line you can paste into chats.
❓ FAQ

Frequently Asked Questions

  • What does d/dx mean?

    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.

  • What’s the difference between f′(x) and f′(x₀)?

    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.

  • Why does the derivative sometimes look different from my answer?

    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.

  • Does this handle partial derivatives?

    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.)

  • What if my function has absolute values or piecewise definitions?

    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).

  • Is numeric differentiation always accurate?

    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.

MaximCalculator provides simple, user-friendly tools. Always double-check critical math and consult your instructor’s conventions if needed.