Derivative Calculator

Use this Derivative Calculator to enter values, adjust options, and review results in a compact responsive workspace.

Results are calculated automatically as you enter data.

Derivative details
Derivative

▼ See explanations and tips below ▼

What Is a Derivative?

A derivative describes how fast a function is changing. If a function is written as \(f(x)\), its derivative is usually written as \(f'(x)\) or \(\frac{d}{dx}f(x)\). At a particular input value, the derivative gives the slope of the tangent line to the graph at that point.

This idea connects two views of the same concept:

  • Symbolic view: Find a new expression, such as changing \(f(x)=3x^2\) into \(f'(x)=6x\).
  • Graph view: Use the derivative value as the slope of the line that just touches the curve at one point.
  • Rate-of-change view: Interpret the derivative as how quickly the output changes when \(x\) changes.

For introductory calculus, the key point is that a derivative is not just another formula. It tells you whether a function is increasing, decreasing, flat, or changing steeply near a chosen value of \(x\).


Why Derivatives Matter

Derivatives are one of the central tools of calculus because they turn change into something measurable. In algebra, you may calculate values of a function. In calculus, you can also ask how those values are changing.

Students use derivatives to find slopes, tangent lines, velocity, acceleration, growth rates, marginal cost, optimization points, and local approximations. A derivative can show when a curve is rising, when it is falling, and when it has a horizontal tangent. This makes derivatives useful in math, physics, economics, engineering, biology, and any subject where a quantity changes with respect to another quantity.

Derivatives also help replace repeated limit calculations with reusable rules. Once you know rules such as the power rule, constant rule, and trigonometric derivative rules, you can find many derivatives quickly and then interpret the result as a slope or rate of change.


Key Terms to Know

  • Function: A rule that assigns an output value to each allowed input value. In this calculator, functions are written using the single variable \(x\).
  • Derivative: A function or value that describes the rate of change of another function.
  • Slope: The steepness of a line. For a derivative at a point, the slope is the slope of the tangent line.
  • Tangent line: A line that matches the curve's direction at a chosen point. Near that point, it gives a local linear approximation to the curve.
  • Power rule: A shortcut for differentiating powers of \(x\), such as \(x^2\), \(x^3\), or \(x^{-2}\).
  • Constant rule: The rule that the derivative of a constant is \(0\).
  • Domain: The set of input values where a function is defined. For example, \(\ln(x)\) is real-valued only for \(x>0\).
  • Radians: The angle measure used for standard calculus derivative rules for trigonometric functions.
  • Local linear approximation: An approximation that uses a tangent line to estimate nearby function values.

How Derivatives and Slope at a Point Work

The derivative at a point can be defined as the limiting slope of secant lines. If the chosen point is \(x_0\), then:

$$ f'(x_0)=\lim_{h\to 0}\frac{f(x_0+h)-f(x_0)}{h} $$

This formula compares the change in the output, \(f(x_0+h)-f(x_0)\), with the change in the input, \(h\), and then lets \(h\) get closer and closer to \(0\). When that limit exists, it gives the instantaneous slope at \(x_0\).

After you know the derivative expression \(f'(x)\), the slope at a specific value is found by substituting that value into the derivative:

$$ \text{slope at }x_0=f'(x_0) $$

The tangent line at \(x_0\) uses the point on the function and the derivative slope:

$$ y=f(x_0)+f'(x_0)(x-x_0) $$

Where:

  • \(x_0\) is the selected input value.
  • \(f(x_0)\) is the function value at that input.
  • \(f'(x_0)\) is the slope at that input.
  • \(y=f(x_0)+f'(x_0)(x-x_0)\) is the tangent line equation.

For supported expressions, this calculator applies derivative rules term by term. That means it handles sums and differences of simple terms by differentiating each term separately and then joining the derivative pieces.

Supported term form Derivative rule
\(c\) \(\frac{d}{dx}[c]=0\)
\(ax^n\), where \(n\) is an integer \(\frac{d}{dx}[ax^n]=anx^{n-1}\)
\(a\sin(x)\) \(\frac{d}{dx}[a\sin(x)]=a\cos(x)\)
\(a\cos(x)\) \(\frac{d}{dx}[a\cos(x)]=-a\sin(x)\)
\(a\tan(x)\) \(\frac{d}{dx}[a\tan(x)]=a\sec^2(x)\)
\(a\ln(x)\) \(\frac{d}{dx}[a\ln(x)]=\frac{a}{x}\), for real \(\ln(x)\) where \(x>0\)
\(ae^x\) \(\frac{d}{dx}[ae^x]=ae^x\)

These are introductory derivative rules for common single-variable terms. They are not the full set of calculus rules. Products, quotients, chain-rule expressions, nested functions, and arbitrary parenthesized expressions require additional methods.


Examples of Derivatives in Practice

Example 1: Polynomial derivative and slope

Suppose:

$$ f(x)=3x^3-2x^2+5x-7 $$

Differentiate each term:

$$ \frac{d}{dx}[3x^3]=9x^2 $$
$$ \frac{d}{dx}[-2x^2]=-4x $$
$$ \frac{d}{dx}[5x]=5 $$
$$ \frac{d}{dx}[-7]=0 $$

So the derivative is:

$$ f'(x)=9x^2-4x+5 $$

At \(x=1\), the slope is:

$$ f'(1)=9(1)^2-4(1)+5=10 $$

The function value is:

$$ f(1)=3(1)^3-2(1)^2+5(1)-7=-1 $$

So the tangent line at \(x=1\) is:

$$ y=-1+10(x-1) $$

A slope of \(10\) means the graph is increasing steeply at that point.


Example 2: Trigonometric derivative and tangent line

Suppose:

$$ f(x)=\sin(x)+2\cos(x) $$

Using the sine and cosine derivative rules:

$$ f'(x)=\cos(x)-2\sin(x) $$

At \(x=0\), using radians:

$$ f'(0)=\cos(0)-2\sin(0)=1-0=1 $$

The function value is:

$$ f(0)=\sin(0)+2\cos(0)=0+2=2 $$

The tangent line at \(x=0\) is:

$$ y=2+1(x-0) $$

or:

$$ y=x+2 $$

This means the curve is rising at a rate of about \(1\) unit of output per \(1\) unit of \(x\) near \(x=0\).


Example 3: Constants, logarithms, and domain limits

Suppose:

$$ f(x)=7+\ln(x) $$

The constant term has derivative \(0\), and the derivative of \(\ln(x)\) is \(\frac{1}{x}\) on its real domain. So:

$$ f'(x)=\frac{1}{x} $$

At \(x=1\):

$$ f'(1)=\frac{1}{1}=1 $$

But at \(x=0\), the expression \(\ln(0)\) is not finite, and \(\frac{1}{0}\) is not finite. This is a domain issue, not just a formatting issue. A derivative expression may be recognizable while a numeric slope or tangent preview is unavailable at a selected point where the function is not defined or the calculation is not finite.


How to Interpret the Result

The derivative expression tells you the rule for the slope as \(x\) changes. For example, if \(f'(x)=6x\), the slope is not one fixed value; it depends on the selected \(x\) value.

The slope at a chosen \(x\) is the numeric value of \(f'(x)\) at that point:

  • If \(f'(x_0)>0\), the function is increasing at \(x_0\).
  • If \(f'(x_0)<0\), the function is decreasing at \(x_0\).
  • If \(f'(x_0)=0\), the tangent line is horizontal at \(x_0\).
  • A larger value of \(|f'(x_0)|\) means a steeper tangent line.

The tangent preview represents the original function near the selected point along with the tangent line based on:

$$ y=f(x_0)+f'(x_0)(x-x_0) $$

The derivative result is symbolic for the supported parsed terms. Terms whose derivative is zero are omitted from multi-term derivative output, and a constant-only function differentiates to \(0\). The slope result is numeric, so it may be rounded for display. If the slope is shown as unavailable, the derivative expression may still be shown, but the selected point may be outside the function's domain or may lead to a non-finite value.

The rules-used information helps you see which derivative rules were applied. This is useful for learning because it connects the final answer to the rule, such as the power rule, constant rule, or a trigonometric derivative rule.


Common Mistakes and Misconceptions

A common mistake is entering a full equation instead of only the function expression. Enter \(3x^2-4x\), not \(y=3x^2-4x\) or \(f(x)=3x^2-4x\).

Another mistake is using unsupported multiplication syntax in polynomial terms. Write \(3x^2\) rather than \(3*x^2\).

Do not assume every expression that is valid in a full computer algebra system is supported here. A term like \(\sin(2x)\) needs the chain rule, and a term like \(x\sin(x)\) needs the product rule. Those are important calculus methods, but they are outside this calculator's supported input forms.

For trigonometric functions, use radians when interpreting numeric values. For example, \(x=1\) means \(1\) radian, not \(1\) degree.

The \(x\) value must be a finite number. Symbolic entries such as pi, \(\frac{1}{2}\), or \(2+3\) are not treated as numeric expressions in the \(x\) value field. Use a decimal number instead, such as \(3.14159\) for an approximation of \(\pi\).

It is also important not to confuse \(f(x)\) with \(f'(x)\). The function value gives the height of the graph. The derivative value gives the slope of the graph.


When to Use Derivatives and Slope at a Point

Use derivatives when you want to understand how a function changes, not just what value it has.

This is especially useful when you want to:

  • Find the derivative of a supported single-variable expression.
  • Evaluate the slope of a curve at a chosen \(x\) value.
  • Connect a derivative expression to a tangent line.
  • Check introductory calculus work involving simple powers, constants, trig functions, \(\ln(x)\), or \(e^x\).
  • Understand whether a function is increasing, decreasing, or flat near a point.
  • Practice recognizing which derivative rule applies to each term.

Limitations and Things to Keep in Mind

This calculator is designed for supported single-variable expressions in \(x\). It is not a full symbolic algebra system.

Supported term forms include \(ax^n\), constants, \(\sin(x)\), \(\cos(x)\), \(\tan(x)\), \(\ln(x)\), and \(e^x\), combined with plus or minus signs. Polynomial exponents must be integers. Decimal or fractional exponents are not supported in polynomial terms.

The calculator does not support multiple variables, product rule expressions, quotient rule expressions, chain rule expressions, nested functions, or transformed arguments such as \(\sin(2x)\), \(\ln(x+1)\), or \(e^{2x}\).

The selected \(x\) value must be a finite number. If the \(x\) value is left blank, it is treated as \(0\). Symbolic values and expressions, including pi, fractions written as 1/2, or arithmetic such as 2+3, are not accepted in the \(x\) value field.

Domain matters. For example, \(\ln(x)\) is real-valued only for \(x>0\), \(x^{-2}\) is undefined at \(x=0\), and \(\tan(x)\) is undefined where \(\cos(x)=0\). A derivative formula can sometimes be displayed even when the numeric slope or tangent preview is unavailable at the selected point.

Displayed numeric results are formatted for readability. Polynomial coefficients are kept as exact entered decimals while matching powers are combined, so a small residual is not lost just because much larger terms appear beside it. If a nonzero coefficient cannot be represented safely for numeric evaluation, the calculator shows the symbolic derivative but marks the slope and tangent preview unavailable rather than displaying a misleading zero. Ordinary finite values may be shown with up to six decimal places, while very large or very small values may be shown with significant-digit formatting. Graph interaction values may be rounded for display, so use the result as an educational calculation rather than as a substitute for formal proof or a full computer algebra system.


How to Use This Calculator

  1. Enter a supported function of \(x\), such as \(3x^3-2x^2+5x-7\), \(\sin(x)+2\cos(x)\), \(\ln(x)\), or \(e^x\).
  2. Enter only the right side of the function. Do not include an equals sign.
  3. Optionally enter a finite \(x\) value for the slope and tangent preview. Leave it blank to use \(x=0\).
  4. Review the derivative result, slope at \(x\), and rules used.
  5. Use the example buttons to load sample polynomial or trigonometric inputs, or clear the inputs to start over.
  6. Use the graph preview to see the function and tangent line near the selected point. The graph can also be downloaded as a PNG.

Frequently Asked Questions

What does the derivative tell me?

The derivative tells you how fast a function is changing. At a specific point, it gives the slope of the tangent line to the graph at that point. Positive values mean the function is increasing there, negative values mean it is decreasing there, and zero means the tangent line is horizontal.


What is the difference between the derivative result and the slope at \(x\)?

The derivative result is an expression, such as \(9x^2-4x+5\). The slope at \(x\) is what you get after substituting a specific value into that expression. For example, if \(f'(x)=9x^2-4x+5\), then the slope at \(x=1\) is \(10\).


Why should I enter only the right side of the function?

The calculator works with a function expression in terms of \(x\). An entry such as \(f(x)=3x^2\) or \(y=3x^2\) includes an equals sign and is an equation, not just the expression to differentiate. Enter \(3x^2\) instead.


Does this calculator support the product rule, quotient rule, or chain rule?

No. It supports a focused set of simple term forms, including powers of \(x\), constants, \(\sin(x)\), \(\cos(x)\), \(\tan(x)\), \(\ln(x)\), and \(e^x\). Expressions such as \(x\sin(x)\), \(\frac{x}{x+1}\), \(\sin(2x)\), and \(\ln(x+1)\) require rules that are outside this calculator's supported syntax.


Do trigonometric inputs use degrees or radians?

Use radians for trigonometric evaluation. Standard calculus derivative rules such as \(\frac{d}{dx}\sin(x)=\cos(x)\) assume the input angle is measured in radians. If you use degree-based thinking, the numeric slope interpretation will not match the usual calculus rule.


Why is the slope or tangent preview unavailable?

The selected point may be outside the domain of the function, or the function or derivative may not produce a finite value there. For example, \(\ln(x)\) is not real-valued at \(x=0\), and \(x^{-1}\) is undefined at \(x=0\). In those cases, the derivative expression may still be recognizable, but the numeric slope or tangent preview may not be available.


Can I enter \(\pi\) as the \(x\) value?

The \(x\) value field accepts finite numeric values, not symbolic expressions. To use \(\pi\), enter a decimal approximation such as \(3.14159\). Fractions such as 1/2 and arithmetic expressions such as 2+3 should also be entered as decimal or integer values.


Sources and References

Books and Textbooks

  1. Gilbert Strang and Edwin “Jed” Herman. Calculus Volume 1. OpenStax, 2016. Relevant sections: 1.3 Trigonometric Functions; 3.1 Defining the Derivative; 3.3 Differentiation Rules; 3.5 Derivatives of Trigonometric Functions; 3.9 Derivatives of Exponential and Logarithmic Functions. https://openstax.org/books/calculus-volume-1
  2. Matthew Boelkins, David Austin, Christina Safranski, and Steven Schlicker. Active Calculus: Single Variable. 2nd ed., Grand Valley State University Libraries, 2025. Relevant sections: derivative at a point, tangent line approximation, elementary derivative rules, trigonometric derivatives, and natural logarithm derivatives. https://scholarworks.gvsu.edu/books/34/

Online and Official Sources

  1. MIT OpenCourseWare. “Session 1: Introduction to Derivatives.” 18.01SC Single Variable Calculus, Massachusetts Institute of Technology, accessed June 28, 2026. https://ocw.mit.edu/courses/18-01sc-single-variable-calculus-fall-2010/pages/1.-differentiation/part-a-definition-and-basic-rules/session-1-introduction-to-derivatives/
  2. MIT OpenCourseWare. “Session 23: Linear Approximation.” 18.01SC Single Variable Calculus, Massachusetts Institute of Technology, accessed June 28, 2026. https://ocw.mit.edu/courses/18-01sc-single-variable-calculus-fall-2010/pages/unit-2-applications-of-differentiation/part-a-approximation-and-curve-sketching/session-23-linear-approximation/