Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Derivative Visualizer & Tangent Line Tool

How to use
  1. Pick a function in the Function menu at the top; its derivative is drawn dashed beside it. Learn more about the seven functions
  2. Drag the slider x0x_0: the amber tangent follows ff, and the navy dot on f′f' sits at the height of its slope. Learn more about the slider
  3. The explanation lists the points to try for each function. Learn more about the points to try
  4. The labels give f(x0)f(x_0) and f′(x0)f'(x_0); the explanation says whether ff is rising, falling or level there. Learn more about the numbers
  5. The switches hide the curve of f′f' or the tangent; the Concepts tab explains derivatives in general. Learn more about the Concepts tab


The derivative
f(x)f(x)
f′(x)f'(x)
x0=1x_0 = 1f(x0)=1f(x_0) = 1f′(x0)=2f'(x_0) = 2
Slope and derivative · Quadratic
f′(x0)=lim⁡h→0f(x0+h)−f(x0)h\displaystyle f'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}
General

The amber tangent touches ff at x0x_0; its slope is f′(x0)f'(x_0). The navy dot at the same x0x_0 sits on the curve of f′f' at exactly that height. Slide x0x_0 and the two stay in step.

For this function

Function · f(x)=x2f(x) = x^2

Derivative · f′(x)=2xf'(x) = 2x

Points to try · x0=0x_0 = 0, the lowest point of ff, where f′f' crosses zero.

At x0=1x_0 = 1 · f(x0)=1f(x_0) = 1 and f′(x0)=2f'(x_0) = 2: the tangent to ff has slope 22, and the derivative's curve is at height 22 right below or above it.

f′(x0)>0f'(x_0) > 0, so ff is rising here.

x0=1x_0 = 1
Speed




Key Terms



Key Terms

Derivative — the instantaneous rate of change of ff at a point, written f′(x)f'(x) or dfdx\frac{df}{dx}. Equal to the slope of the tangent line to ff at that point.

Tangent line — the straight line that just touches the curve of ff at a single point, sharing the same slope as ff there. Its slope is f′(x0)f'(x_0).

f prime as a function — the derivative f′f' is a function of xx in its own right. Its value at any xx is the slope of ff at that same xx.

Critical point — a value of xx where f′(x)=0f'(x) = 0 or f′(x)f'(x) is undefined. Local maxima and minima of ff live at critical points.

Inflection point — a value of xx where ff changes concavity. These are extrema of f′f' (where f′′f'' would be zero).

Closed-form derivative — an exact symbolic formula for f′f', like ddx[x2]=2x\frac{d}{dx}[x^2] = 2x or ddx[sin⁡x]=cos⁡x\frac{d}{dx}[\sin x] = \cos x.

Getting Started

The tool has three parts. Across the top runs a bar with the Function menu and the buttons for zooming, the starting view, saving a picture and full screen. On the left is the graph. On the right is the explanation, with the controls under it.

The graph shows ff in solid blue and its derivative f′f' in dashed navy. At the point x0x_0, the amber tangent touches ff, and a navy dot sits on the curve of f′f' at the same x0x_0 — at exactly the height of the tangent's slope. A dashed vertical line joins the two.

The tool opens with f(x)=x2f(x) = x^2 at x0=1x_0 = 1: the tangent has slope 22, and the curve of f′(x)=2xf'(x) = 2x is at height 22 there.

The Function Families

DemoPicking a function
Step 0 of 2
The Function menu lists seven functions, each with its exact derivative:

Polynomial: the identity xx (slope 11 everywhere), x2x^2 (derivative 2x2x) and x3x^3 (derivative 3x23x^2).

Transcendental: sin⁡x\sin x and cos⁡x\cos x, whose derivatives are cos⁡x\cos x and −sin⁡x-\sin x; exe^x, which is its own derivative; and ln⁡x\ln x, with derivative 1/x1/x on x>0x > 0 only.

The explanation gives both formulas and the points to try for each function — where f′f' is zero, where ff is steepest, and so on.

Identity: a Constant Derivative

f(x)=xf(x) = x is the straight line through the origin at 45 degrees, and its derivative is the constant f′(x)=1f'(x) = 1. On the graph that shows up as a horizontal dashed line sitting at height 1 — the same value no matter where x0x_0 goes.

At x0=1x_0 = 1 the readings are f(x0)=1f(x_0) = 1 and f′(x0)=1f'(x_0) = 1. The tangent to ff is the line itself, because a straight line is its own best linear approximation everywhere.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = x f′(x) = 1
Identity, frozen at x0 = 1

f is the 45-degree line, f′ the flat dashed line at height 1. The tangent lies exactly on f, because a straight line is its own tangent everywhere.

Drag x0x_0 anywhere and the tangent never tilts. That is what a constant derivative means: the rate of change does not depend on position.

The two curves are worth comparing as objects rather than as pictures. ff is a line with slope 1; f′f' is a line with slope 0. Differentiating dropped the degree by one, which is the pattern the quadratic and cubic families continue.

Quadratic: a Derivative That Grows Linearly

f(x)=x2f(x) = x^2 has f′(x)=2xf'(x) = 2x — a parabola paired with a straight line through the origin.

At x0=1x_0 = 1: f(x0)=1f(x_0) = 1 and f′(x0)=2f'(x_0) = 2. The tangent on the parabola climbs at slope 2, and the dot on f′f' sits at height 2. Those are the same number seen two ways, which is the whole point of showing both curves at once.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = x² f′(x) = 2x
Quadratic, frozen at x0 = 1

The parabola with its derivative drawn as the line f′(x) = 2x. At x0 = 1 the tangent slope is 2 and the dashed line passes through height 2 - the same number in two places.

The sign structure is easy to read here. f′(x)=2xf'(x) = 2x is negative for x<0x < 0, zero at the origin, positive for x>0x > 0 — so the parabola falls, levels off, then rises. The single zero of f′f' marks the single turning point of ff.

Notice also that f′f' crosses zero rather than merely touching it. That crossing is what makes the origin a genuine minimum instead of a flat spot, a distinction the cubic makes vivid by failing it.

Cubic: a Flat Spot That Is Not an Extremum

f(x)=x3f(x) = x^3 has f′(x)=3x2f'(x) = 3x^2, an upward parabola that touches zero at the origin and is positive everywhere else.

At x0=1x_0 = 1: f(x0)=1f(x_0) = 1 and f′(x0)=3f'(x_0) = 3. Slide x0x_0 to the origin and the tangent goes flat — but the curve does not turn around.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = x³ f′(x) = 3x²
Cubic, frozen at x0 = 1

f′(x) = 3x² sits entirely above the axis apart from a single touch at the origin. That touch without a crossing is why x³ has a flat spot but no turning point.

This is the standard counterexample to "zero derivative means extremum". At x=0x = 0 the tangent is horizontal, yet f′≥0f' \ge 0 everywhere, so the function never stops increasing. It merely pauses.

What distinguishes this from the quadratic is that f′f' touches the axis without crossing it. No sign change, no turning point. The rule that actually classifies a critical point is the sign change of f′f', not the zero itself.

Sine: the Derivative Is a Quarter Turn

f(x)=sin⁡(x)f(x) = \sin(x) has f′(x)=cos⁡(x)f'(x) = \cos(x) — the same wave, shifted left by π/2\pi/2.

At x0=1x_0 = 1: f(x0)=0.84f(x_0) = 0.84 and f′(x0)=0.54f'(x_0) = 0.54. The sine is still climbing at that point, though it is slowing down as it nears its peak at π/2≈1.571\pi/2 \approx 1.571.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = sin(x) f′(x) = cos(x)
Sine, frozen at x0 = 1

Two waves a quarter period apart. The marker on f′ reads 0.54 while f reads 0.84 - the sine is still rising, but slowing as it approaches its peak.

The shift is the most useful thing to see here. Every peak of sin⁡\sin lines up with a zero of cos⁡\cos going downward, every trough with a zero going upward, and the steepest parts of the sine sit exactly where the cosine reaches ±1\pm 1.

Differentiating four times returns you to where you started: sin⁡→cos⁡→−sin⁡→−cos⁡→sin⁡\sin \to \cos \to -\sin \to -\cos \to \sin. Each step is another quarter turn, which is why trigonometric derivatives cycle rather than simplify.

Cosine: the Same Wave With a Sign

f(x)=cos⁡(x)f(x) = \cos(x) has f′(x)=−sin⁡(x)f'(x) = -\sin(x). Same shape as the sine family, but the minus sign matters.

At x0=1x_0 = 1: f(x0)=0.54f(x_0) = 0.54 and f′(x0)=−0.84f'(x_0) = -0.84. The cosine is descending there — it peaked at the origin and is on its way down to its zero at π/2\pi/2.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = cos(x) f′(x) = −sin(x)
Cosine, frozen at x0 = 1

The same pair with the roles swapped and a sign attached: f reads 0.54 and f′ reads -0.84. The dashed curve is below the axis wherever the cosine is falling.

Compare this with the sine family directly: the readings swap roles and one of them picks up a minus. That is not a coincidence but the quarter-turn rule applied one step further along the cycle.

The negative sign is also the reason the second derivative of cos⁡\cos is −cos⁡-\cos — the function equals the negative of its own second derivative, which is exactly the differential equation that makes sine and cosine describe oscillation.

Exponential: Its Own Derivative

f(x)=exf(x) = e^x has f′(x)=exf'(x) = e^x. The two curves coincide exactly, so the solid and dashed lines lie on top of each other across the whole graph.

At x0=1x_0 = 1: f(x0)=2.72f(x_0) = 2.72 and f′(x0)=2.72f'(x_0) = 2.72. Both dots land at the same height, and they will do so wherever x0x_0 goes.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = eˣ f′(x) = eˣ
Exponential, frozen at x0 = 1

Solid and dashed curves coincide across the whole frame, and both markers land at 2.72. This is the graph of a function equal to its own derivative.

This is the defining property of exe^x, not a curiosity of it. Any function satisfying f′=ff' = f has to be CexCe^x for some constant CC, and requiring f(0)=1f(0) = 1 pins down C=1C = 1. That is one legitimate way to define the number ee in the first place.

Geometrically it says the height of the curve is its own slope: at height 2.72 the tangent rises at 2.72 per unit. Growth proportional to current size is exactly what compound interest, population models and radioactive decay all express.

Logarithm: a Derivative That Blows Up

f(x)=ln⁡(x)f(x) = \ln(x) has f′(x)=1/xf'(x) = 1/x, and both are defined only for x>0x > 0 — the left half of the graph is empty for this family.

At x0=1x_0 = 1: f(x0)=0f(x_0) = 0 and f′(x0)=1f'(x_0) = 1. The logarithm crosses the x-axis at 1, and it does so at slope exactly 1.
-5 -4 -3 -2 -1 1 2 3 4 5 -5 -4 -3 -2 -1 1 2 3 4 5 x y f(x) = ln(x) f′(x) = 1/x
Logarithm, frozen at x0 = 1

Nothing is drawn left of the y-axis: both ln x and 1/x are undefined there. At x0 = 1 the log crosses zero while its derivative reads exactly 1.

Watch what happens as x0x_0 moves toward zero. The logarithm plunges without bound, and 1/x1/x climbs without bound alongside it — the curve gets steeper and steeper with no limiting slope. Move the other way and both flatten out: at x=5x = 5 the slope is already down to 0.20.2.

That contrast is worth holding next to the exponential, which is the inverse function. Where exe^x grows faster than any polynomial, ln⁡x\ln x grows slower than any positive power of xx — and the reciprocal derivative is precisely why.

The x₀ Slider

DemoMoving x₀
Step 0 of 3
The slider x0x_0 sweeps the point from −5-5 to 55 in steps of 0.050.05. As you drag it, the tangent turns to follow the curve, the navy dot rides along the curve of f′f', and the dashed line between them shows that the height of f′f' is the slope of ff. Press ▶ to let it run by itself.

The explanation says in words what the slope means: f′(x0)>0f'(x_0) > 0, ff is rising; f′(x0)<0f'(x_0) < 0, ff is falling; f′(x0)=0f'(x_0) = 0, the tangent is level and f′f' crosses or touches the axis — a candidate for a maximum or minimum.

Points to Try

DemoPoints to try on sine
Step 0 of 2
Each function comes with a short list of points to try in the explanation — the places where ff and f′f' tell the clearest story:

• For x2x^2: x0=0x_0 = 0, the bottom of the parabola, where f′f' crosses zero.
• For x3x^3: x0=0x_0 = 0, a level tangent that is not a maximum or minimum.
• For sin⁡x\sin x: x0=1.57x_0 = 1.57, a top of ff with f′=0f' = 0, and x0=0x_0 = 0, the steepest point of ff and the top of f′f'.
• For exe^x: any point — f′f' lies right on ff.

Drag x0x_0 to each and read the slope label.

Reading the Numbers

Two amber labels along the bottom of the graph give the numbers at the point:

• f(x0)f(x_0) — the height of the curve, where the tangent touches it.
• f′(x0)f'(x_0) — the slope of the tangent, which is also the height of the navy dot on the curve of f′f'.

The explanation repeats them in a sentence. Where ff or f′f' is not defined — ln⁡x\ln x at a negative x0x_0 — the labels show a dash and the explanation says to move x0x_0 into the domain.

The Switches and Zoom

DemoThe switches and the Concepts tab
Step 0 of 2
Two switches under the slider change what is drawn: Curve of f′ hides or shows the dashed derivative, and Tangent and points hides or shows the tangent, the dots and the dashed link.

The buttons at the top right zoom in and out, return to the starting view, save the graph as a picture and open the tool full screen.

The Concepts Tab

Above the explanation, the Concepts tab holds a page that does not change with the controls:

• what a derivative is, and its two pictures — a slope at a point, and a function of its own;
• what to look for: zeros of f′f' at maxima and minima, steep stretches, inflection points at the extremes of f′f';
• exact formulas versus the central difference a calculator uses.

What Is a Derivative

The derivative of ff at the point x0x_0 measures how fast ff changes when the input changes a tiny bit. Formally:

f′(x0)=lim⁡h→0f(x0+h)−f(x0)hf'(x_0) = \lim_{h \to 0} \frac{f(x_0 + h) - f(x_0)}{h}


The fraction inside the limit is the slope of the secant line through the two nearby points (x0,f(x0))(x_0, f(x_0)) and (x0+h,f(x0+h))(x_0 + h, f(x_0 + h)). As hh shrinks to zero, the secant slope approaches the slope of the tangent line to ff at x0x_0 — the derivative.

When the derivative exists at every xx in some interval, the collection of values f′(x)f'(x) forms a new function f′f', called the derivative function of ff.

For the full theory of derivatives and limit-based definitions, see the derivatives page.

Geometric Meaning - The Tangent Line

The geometric picture: the tangent line to ff at x0x_0 is the straight line that just barely touches the curve at one point, sharing the same direction as ff there. Its slope is f′(x0)f'(x_0), and it passes through (x0,f(x0))(x_0, f(x_0)). The point-slope form gives:

y=f(x0)+f′(x0)(x−x0)y = f(x_0) + f'(x_0)(x - x_0)


This is also the best linear approximation to ff near x0x_0 — for inputs close to x0x_0, the tangent line predicts ff accurately.

Three things to look for as you slide x0x_0 across the graph:

• Steep parts of ff — the tangent tilts hard; f′f' is far from zero.

• Flat parts of ff — the tangent goes horizontal; f′f' is at zero.

• Maxima and minima of ff — exactly where f′f' crosses zero.

For deeper coverage of the tangent line and its applications, see the tangent line page.

From f to f Prime

The derivative isn't just one number at one point — it's a whole new function. As xx varies, the slope of the tangent to ff at xx varies too, tracing out a curve. That curve is the derivative function f′(x)f'(x).

The qualitative correspondence between ff and f′f':

• ff increasing ⇔\Leftrightarrow f′>0f' > 0 (curve of f′f' above the x-axis).

• ff decreasing ⇔\Leftrightarrow f′<0f' < 0 (curve of f′f' below the x-axis).

• ff has a local max or min ⇔\Leftrightarrow f′f' crosses zero.

• ff concave up ⇔\Leftrightarrow f′f' increasing.

• ff concave down ⇔\Leftrightarrow f′f' decreasing.

• ff has an inflection point ⇔\Leftrightarrow f′f' has a local max or min.

Sliding x0x_0 through the tool with both curves visible makes this dictionary visible at every step.