Calculus · Interactive calculator

Tangent Line Calculator with a live graph

Enter a function and the x-value of the point. The tool estimates the derivative, writes the tangent equation, and lets you move a second point closer to see a secant become the tangent.

The calculation

A tangent line needs a point and a slope.

1. Find the point

Evaluate the function at x₀. That gives the point (x₀, f(x₀)) that the tangent line must pass through.

2. Find the slope

The derivative f′(x₀) is the limiting value of nearby secant slopes. This tool estimates it numerically from values on both sides.

3. Write the line

Use point-slope form y−f(x₀)=f′(x₀)(x−x₀), then rearrange if you want y=mx+b.

Worked example

How to calculate the tangent line at a point

The calculator above does the arithmetic for any supported function. This example shows exactly what the result means.

Example: f(x)=x² at x=1

The point on the curve is (1, 1). Since f′(x)=2x, the slope of the tangent line at x=1 is 2.

Use point-slope form

Start with y−1=2(x−1). Expanding gives the tangent-line equation y=2x−1.

Check it on the graph

The tangent touches the curve at (1,1). Move the secant point toward x=1 above and its slope approaches 2, connecting the calculation to the derivative limit.

Common questions

Tangent line calculator FAQ

How do you find the slope of the tangent line?

Evaluate the derivative at the point: the tangent slope is f′(x₀). When a symbolic derivative is not available, this calculator estimates the same local slope numerically from nearby function values.

What is the tangent line equation at a point?

If the point is (x₀, f(x₀)) and the tangent slope is m=f′(x₀), use point-slope form: y−f(x₀)=m(x−x₀). You can then rearrange it into y=mx+b.

What is the difference between a secant line and a tangent line?

A secant uses two distinct points on the curve. As the second point approaches the first, the secant slope approaches the tangent slope when that derivative exists.

Learn the idea visually

If you want to see why the limit produces the tangent slope, continue with Secant → tangent and Derivative as slope at a point.