Skip to content
ihateDesmos

Tangent line calculator

Type a function and a point to get the equation of the tangent line there, with the derivative, the slope and the working shown. One click graphs the curve and tangent together.

y =
Result
y=6x−9

Slope 6 at the point (3, 9)

Steps
  1. The point on the curve: f(3) = 9
  2. The derivative: f′(x) = 2 x
  3. The slope there: f′(3) = 6
  4. Point-slope form: y − (9) = 6(x − (3))
  5. Solve for y: y = 6 x - 9
Graph the curve and its tangent line

How to use it

  1. 1
    Type a function of x, like x^3 - 2x.
  2. 2
    Type the x-coordinate of the point.
  3. 3
    Press Find the tangent, then use the graph link to see the line touch the curve.

How to find a tangent line

  1. Find the point: work out f(a).
  2. Find the slope: differentiate, then work out f′(a).
  3. Write the line: y − f(a) = f′(a)(x − a).

For f(x) = x² at x = 3: the point is (3, 9). The derivative is 2x, so the slope is 6. The line is y − 9 = 6(x − 3), which simplifies to y = 6x − 9.

What a tangent line means

Zoom in far enough on a smooth curve and it starts to look straight. That straight line is the tangent. Its slope is the curve’s instantaneous rate of change at that point, which is what a derivative measures. Near the point, the tangent line is a good approximation of the curve, which is the idea behind linear approximation and Newton’s method.

The normal line

The normal line passes through the same point but is perpendicular to the tangent, so its slope is −1 ÷ f′(a). For the example above, the normal has slope −1/6, so it is y − 9 = −(1/6)(x − 3).

Special cases

  • Horizontal tangents are where f′(x) = 0, at turning points and some inflection points.
  • Vertical tangents have an infinite slope, like ∛x at x = 0.
  • No tangent exists at a sharp corner, like |x| at x = 0, where the slope jumps.

Frequently asked questions

How do you find the slope of a tangent line?
Differentiate the function and substitute the x-value of the point. That value of the derivative is the slope.
What is the equation of a tangent line?
y − f(a) = f′(a)(x − a), where a is the x-coordinate of the point.
Can a tangent line cross the curve?
Yes. It touches at the point of tangency, but it may cross elsewhere, and even at that point at an inflection.
What is the difference between a tangent and a secant?
A secant passes through two points on a curve. As the points move together, the secant approaches the tangent, which is exactly how the derivative is defined.

Related tools and guides

Try the tangent line calculator

It opens instantly, with no account and nothing to install.

Open the calculator