Language
English English Vietnamese (Tiếng Việt) Vietnamese (Tiếng Việt) Chinese (简体中文) Chinese (简体中文) Portuguese (Brazil) (Português do Brasil) Portuguese (Brazil) (Português do Brasil) Spanish (Español) Spanish (Español) Indonesian (Bahasa Indonesia) Indonesian (Bahasa Indonesia)

Derivative Calculator

Calculate derivatives of mathematical functions instantly with detailed step-by-step solutions showing each differentiation rule applied.

What is a Derivative?

A derivative measures how a function changes as its input changes. It represents the instantaneous rate of change or the slope of the tangent line at any point on a curve.

Mathematical notation: The derivative of a function f(x) can be expressed in multiple ways, each serving different contexts in calculus.

Lagrange Notation

f'(x) - Most common in calculus courses

Leibniz Notation

df/dx - Emphasizes rate of change

Euler Notation

Df - Operator-based approach

Why Calculate Derivatives?

Derivatives are fundamental in calculus and have numerous practical applications across multiple disciplines:

Physics

Understanding motion and change in physical systems.

  • Velocity is the derivative of position
  • Acceleration is the derivative of velocity
  • Force calculations in dynamics

Economics

Analyzing costs, revenue, and optimization.

  • Marginal cost and marginal revenue
  • Profit maximization
  • Elasticity of demand

Engineering

Design optimization and system analysis.

  • Optimization problems
  • Signal processing
  • Control systems design

Machine Learning

Training algorithms and model optimization.

  • Gradient descent algorithms
  • Minimizing loss functions
  • Neural network backpropagation

About This Calculator

This derivative calculator helps you find derivatives of mathematical functions instantly with comprehensive step-by-step solutions. It supports a wide range of mathematical functions and differentiation techniques:

  • Polynomial functions (x², x³, x⁴, etc.)
  • Trigonometric functions (sin, cos, tan, cot, sec, csc)
  • Inverse trigonometric functions (arcsin, arccos, arctan)
  • Exponential and logarithmic functions (e^x, ln, log)
  • Composite functions using the chain rule
  • Higher-order derivatives (2nd, 3rd, up to 10th)
Educational advantage: Each calculation shows step-by-step solutions so you can understand the complete differentiation process and learn the underlying mathematical principles.

How to Use This Calculator

1

Enter Your Function

Type your mathematical function in the input field. Use x as the variable. The calculator supports standard mathematical notation with flexible input syntax.

Input Syntax

Operation Symbol Example
Addition + x + 5
Subtraction - x - 3
Multiplication * or implicit 2*x or 2x
Division / x / (x+1)
Power ^ x^3

Supported Functions

Trigonometric

sin(x), cos(x), tan(x), cot(x), sec(x), csc(x)

Inverse Trigonometric

asin(x), acos(x), atan(x)

Exponential

e^x, exp(x), 2^x

Logarithmic

ln(x), log(x)

Other Functions

sqrt(x), abs(x)

Constants

e (≈2.718), pi (≈3.14159)
2

Select Derivative Order

Choose the order of derivative you want to calculate:

  • 1st - First derivative f'(x) - rate of change
  • 2nd - Second derivative f''(x) - concavity and acceleration
  • 3rd - Third derivative f'''(x) - rate of change of acceleration
  • nth - Enter a custom order (up to 10th derivative)
3

Calculate

Click the Calculate Derivative button or press Enter. The result will display:

  • The derivative formula in beautiful mathematical notation
  • Step-by-step solution showing each differentiation step
  • Applied differentiation rules (power rule, chain rule, etc.)
  • Simplified final result
Helpful tips: Click Examples to see common functions you can try. Click the ? icon for syntax help. Use the Copy button to copy results for your work.

Features

Differentiation Rules

This calculator applies all standard differentiation rules automatically with precision. Understanding these rules is essential for mastering calculus:

Power Rule

For f(x) = x^n, the derivative is f'(x) = n·x^(n-1)

This is the most fundamental differentiation rule, used for any function with a variable raised to a power.

Examples:

  • x³ → 3x²
  • x^5 → 5x^4
  • √x = x^(1/2) → (1/2)x^(-1/2) = 1/(2√x)
  • 1/x = x^(-1) → -x^(-2) = -1/x²

Product Rule

For f(x) = u·v, the derivative is f'(x) = u'·v + u·v'

Used when differentiating the product of two functions. Each function is differentiated while the other remains unchanged, then the results are added.

Examples:

  • x·sin(x) → 1·sin(x) + x·cos(x) = sin(x) + x·cos(x)
  • x²·e^x → 2x·e^x + x²·e^x = (2x + x²)·e^x
  • x³·ln(x) → 3x²·ln(x) + x³·(1/x) = 3x²·ln(x) + x²

Quotient Rule

For f(x) = u/v, the derivative is f'(x) = (u'·v - u·v') / v²

Used when differentiating a fraction where both numerator and denominator are functions of x.

Examples:

  • x/(x+1) → [1·(x+1) - x·1] / (x+1)² = 1/(x+1)²
  • sin(x)/cos(x) → [cos(x)·cos(x) - sin(x)·(-sin(x))] / cos²(x) = 1/cos²(x) = sec²(x)
  • x²/(x-1) → [2x·(x-1) - x²·1] / (x-1)² = (x² - 2x) / (x-1)²

Chain Rule

For f(x) = g(h(x)), the derivative is f'(x) = g'(h(x))·h'(x)

The chain rule is essential for composite functions - functions within functions. Differentiate the outer function, then multiply by the derivative of the inner function.

Examples:

  • sin(2x) → cos(2x)·2 = 2·cos(2x)
  • e^(x²) → e^(x²)·2x = 2x·e^(x²)
  • ln(x²+1) → [1/(x²+1)]·2x = 2x/(x²+1)
  • (x²+3)^5 → 5(x²+3)^4·2x = 10x(x²+3)^4

Supported Functions

Trigonometric Derivatives

Function Derivative Notes
sin(x) cos(x) Most common trig function
cos(x) -sin(x) Note the negative sign
tan(x) sec²(x) Equivalent to 1/cos²(x)
cot(x) -csc²(x) Equivalent to -1/sin²(x)
sec(x) sec(x)·tan(x) Product of secant and tangent
csc(x) -csc(x)·cot(x) Product with negative sign

Inverse Trigonometric Derivatives

Function Derivative Domain Restriction
arcsin(x) 1/√(1-x²) -1 < x < 1
arccos(x) -1/√(1-x²) -1 < x < 1
arctan(x) 1/(1+x²) All real numbers

Exponential & Logarithmic Derivatives

Function Derivative Special Property
e^x e^x Derivative equals itself
a^x a^x·ln(a) General exponential form
ln(x) 1/x Natural logarithm (x > 0)
log₁₀(x) 1/(x·ln(10)) Common logarithm

Higher-Order Derivatives

Calculate derivatives of any order from 1st to 10th. Higher-order derivatives reveal important properties of functions:

First Derivative

Rate of change, slope, velocity

Second Derivative

Concavity, acceleration, curvature

Third & Higher

Advanced analysis, jerk, snap
Complete transparency: Each step is shown in the solution, helping you understand how differentiation rules are applied sequentially for higher-order derivatives.

Step-by-Step Solutions

Every calculation shows the complete differentiation process with detailed explanations:

  • Identification of which differentiation rule to apply
  • Intermediate steps showing the application of each rule
  • Simplification process from complex to final form
  • Clear mathematical notation at each stage

LaTeX Rendering

Results are displayed in beautiful mathematical notation using LaTeX, making formulas easy to read and understand. Complex expressions with fractions, exponents, and special symbols are rendered professionally.

Plain Text

Hard to Read

  • d/dx[x^2*sin(x)]
  • = 2x*sin(x)+x^2*cos(x)
  • Difficult to parse visually
LaTeX Rendered

Professional Display

  • Beautiful mathematical symbols
  • Proper fraction formatting
  • Clear, textbook-quality output

Frequently Asked Questions

What functions can this calculator differentiate?

This calculator can differentiate a comprehensive range of mathematical functions:

  • Polynomials - Any power of x (x², x³, x⁴, etc.)
  • Trigonometric - sin, cos, tan, cot, sec, csc
  • Inverse trigonometric - arcsin, arccos, arctan
  • Exponential - e^x, a^x for any base
  • Logarithmic - ln(x), log(x)
  • Roots and radicals - sqrt(x), cube roots
  • Absolute value - abs(x)
  • Composite functions - Using the chain rule automatically

How do I enter my function?

Use standard mathematical notation with x as the variable:

  • Use ^ for powers: x^3 for x³
  • Use * for multiplication or write implicitly: 2*x or 2x
  • Use parentheses for grouping: (x+1)^2
  • Function names: sin(x), ln(x), sqrt(x)

Examples:

  • x^3 + 2*x^2 - 5*x + 1
  • sin(x)*cos(x)
  • e^(x^2)
  • ln(x^2 + 1)

What is the chain rule?

The chain rule is used when differentiating composite functions - functions within functions.

Formula: If f(x) = g(h(x)), then f'(x) = g'(h(x)) · h'(x)

In words: Differentiate the outer function (keeping the inner function unchanged), then multiply by the derivative of the inner function.

Example: For sin(2x), the outer function is sin(u) and inner is u = 2x. The derivative is cos(2x) · 2 = 2cos(2x)

More examples:

  • e^(x²) → e^(x²) · 2x
  • ln(x³) → (1/x³) · 3x² = 3/x
  • (x²+1)^5 → 5(x²+1)^4 · 2x

Can I calculate higher-order derivatives?

Yes! You can calculate derivatives up to the 10th order.

Select from the dropdown menu:

  • 1st - First derivative (rate of change)
  • 2nd - Second derivative (concavity, acceleration)
  • 3rd - Third derivative (jerk in physics)
  • nth - Custom order up to 10

The step-by-step solution shows each derivative calculation in sequence, so you can see how the function transforms at each level.

Why is my result different from what I expected?

The calculator automatically simplifies results to their most reduced form. Your result may look different but is mathematically equivalent.

Common simplifications:

  • x/x becomes 1
  • 0·x becomes 0
  • x + x becomes 2x
  • x² · x³ becomes x⁵
  • sin²(x) + cos²(x) becomes 1
Tip: Check the step-by-step solution to see how the simplification was performed. The intermediate steps show the transformation from the raw derivative to the simplified form.

What does "Unknown identifier" error mean?

This error appears when you use a variable or function name the calculator doesn't recognize.

Common causes:
  • Using variables other than x (like y, z, t)
  • Misspelling function names (sine instead of sin)
  • Using unsupported functions
  • Missing parentheses: sin x instead of sin(x)

Solutions:

  • Always use x as your variable
  • Check function spelling: sin, cos, tan, ln, log, sqrt, etc.
  • Include parentheses for all functions: sin(x), not sin x
  • Click the ? icon for syntax help

How accurate are the results?

The calculator performs symbolic differentiation, meaning it applies differentiation rules exactly as you would by hand.

100% Mathematical Accuracy: The results are mathematically exact, not numerical approximations. The calculator uses the same rules taught in calculus courses.

What this means:

  • No rounding errors or approximations
  • Exact symbolic expressions
  • Same results as manual calculation
  • Suitable for academic and professional use

Is my data saved or sent to a server?

No. All calculations are performed entirely in your browser using JavaScript.

Complete Privacy: Your functions and results are never sent to any server or stored anywhere. Everything happens locally on your device.

Benefits:

  • Complete privacy - no data transmission
  • Works offline after initial page load
  • Fast calculations - no server delays
  • No account or login required
f(x) =
Derivative Order
Enter a function to calculate its derivative
f'(x) =
Step-by-step Solution
Syntax Help

Operators

+Addition -Subtraction *Multiplication /Division ^Power

Functions

sin(x)Sine cos(x)Cosine tan(x)Tangent ln(x)Natural log log(x)Log base 10 sqrt(x)Square root e^xExponential abs(x)Absolute value

Constants

eEuler's number (≈2.718) piPi (≈3.14159)

Examples

x^3 + 2*x^2 - 5*x + 1 sin(x) * cos(x) e^(2*x) + ln(x) (x^2 + 1) / (x - 1)
Enter your function using x as the variable
Use ^ for powers (e.g., x^3 for x³)
Use * for multiplication or write 2x directly
Supported functions: sin, cos, tan, ln, log, sqrt, exp, abs
Select derivative order: 1st, 2nd, 3rd, or nth
Press Enter to calculate quickly
All calculations done in your browser
Want to learn more? Read documentation →
1/8
Start typing to search...
Searching...
No results found
Try searching with different keywords