BYTETOOLS

Tangent Line Calculator

Find the tangent and normal line to a curve at any point. Get the slope, the equation in y = mx + c form and a graph of all three together.

(3, 9)
Point of tangency
6
Slope f′(3)
y = 6x − 9
Tangent line

Lines

  • f′(x) = 2*x
  • tangent = y = 6x − 9
  • normal = y = -0.16666667x + 9.5

Point-slope form: y = f(a) + f′(a)(x − a) = 9 + 6(x − 3).

Graph

Blue: f(x). Red: the tangent. Green: the normal.

What is the Tangent Line Calculator?

The ByteTools Tangent Line Calculator differentiates your function symbolically, evaluates the derivative at the point you choose, and builds the tangent line y = f(a) + f′(a)(x − a) reduced to slope-intercept form.

  • Symbolic derivative used for an exact slope, not an estimate
  • Tangent and normal lines both given in slope-intercept form
  • Point-slope form shown so you can follow the derivation
  • Graph of the curve with tangent and normal drawn together
  • Vertical normals reported as x = a rather than an infinite slope
  • Runs entirely in the browser with nothing uploaded

How to use the Tangent Line Calculator

  1. 1

    Type your function in the f(x) box, for example x^2, sin(x) or ln(x).

  2. 2

    Enter the x value where the tangent should touch the curve.

  3. 3

    Read the slope, the tangent equation and the normal equation in the Lines panel.

  4. 4

    Check the graph to see the curve, the tangent in red and the normal in green.

  5. 5

    Click Copy result to save the equations and the point of tangency.

About the Tangent Line Calculator

The ByteTools Tangent Line Calculator differentiates your function symbolically, evaluates the derivative at the point you choose, and builds the tangent line y = f(a) + f′(a)(x − a) reduced to slope-intercept form. It also gives the normal line, the perpendicular through the same point, and plots the curve with both lines so the geometry is visible.

The point of tangency, the slope and the point-slope form are all shown, so you can check each stage of the working rather than just copying an answer. When the tangent is horizontal the normal is vertical, and the tool reports it as x = a instead of dividing by a zero slope.

Everything is computed locally in your browser using JavaScript — the function you enter is never uploaded, and the page keeps working offline.

Frequently asked questions

How do you find the equation of a tangent line?

Differentiate the function to get f′(x), evaluate it at your point to get the slope, then substitute into y = f(a) + f′(a)(x − a). This calculator does all three steps and simplifies the result into y = mx + c form.

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

The tangent touches the curve at a point and matches its slope there. The normal passes through the same point but is perpendicular to the tangent, so its slope is the negative reciprocal, −1/f′(a).

What happens when the slope of the tangent is zero?

A zero slope means a horizontal tangent, typically at a maximum or minimum. The normal is then vertical, and since a vertical line has no slope-intercept form the calculator reports it as x = a instead of dividing by zero.

Can a tangent line cross the curve?

Yes. Touching the curve and matching its slope at a point says nothing about what happens elsewhere. At an inflection point the tangent passes straight through the curve, which the graph on this page makes easy to see.

Why can't I get a tangent at my chosen point?

The function or its derivative must both have a value there. Points like ln(x) at x ≤ 0, or a sharp corner where no single slope exists, have no tangent line, and the calculator says so rather than inventing one.

Related tools