Skip to content
MoneyDeck

Tangent Line Calculator

Find the tangent and normal line equations of a curve at any point

Updated · Free, no signup

Use x as the variable. ln(x) = natural log; trig uses radians.

Tangent line

y = 10x − 15

Point-slope form

y − 5 = 10(x − 2)

Slope m = f′(a)

10

f(a)

5

Tangent y-intercept

-15

Normal line

y = −0.1x + 5.2

Normal slope −1/m

−0.1

Derivative f′(x)

3x^2 - 2
  • The tangent touches the curve at (2, 5) with slope 10.
  • Near x = 2, f(x) ≈ 5 + 10(x − 2) is a good linear approximation.

Curve, tangent and normal line

About the Tangent Line Calculator

This tangent line calculator finds the straight line that just touches the curve y = f(x) at x = a and has the same slope as the curve there. Type a function such as x^3 − 2x, sqrt(x) or e^x·sin(x) and a point, and it returns the derivative, the slope f′(a), the point of tangency and the tangent line in both point-slope and slope-intercept form.

It also gives the normal line — the line through the same point that is perpendicular to the tangent, with slope −1/f′(a) — which is used in geometry, optics and physics problems. The graph plots the curve with both lines so you can check that the tangent really touches the curve.

It suits calculus students working on derivative applications, teachers building examples, and anyone who needs a linear approximation f(x) ≈ f(a) + f′(a)(x − a) near a point. When the slope is zero the tangent is horizontal and the normal is the vertical line x = a; the calculator reports that case explicitly.

How to use the tangent line calculator

  1. 1Type the function f(x), e.g. x^3 − 2x + 1.
  2. 2Enter the x-coordinate of the point where you want the tangent.
  3. 3Read the slope f′(a) and the point (a, f(a)).
  4. 4Copy the tangent line in point-slope or slope-intercept form.
  5. 5Use the normal line and the graph to check the geometry.

Formula and method

Tangent: y − f(a) = f′(a)(x − a) · Normal: y − f(a) = −(1/f′(a))(x − a)

The tangent line at x = a passes through the point (a, f(a)) and has slope equal to the derivative f′(a). The calculator differentiates f symbolically, evaluates f and f′ at a, and writes the line in point-slope form, then expands it to slope-intercept form y = mx + b with b = f(a) − f′(a)·a.

The normal line passes through the same point but is perpendicular to the tangent, so its slope is the negative reciprocal −1/f′(a). If f′(a) = 0 the tangent is horizontal and the normal is the vertical line x = a. If f′(a) does not exist (a corner, cusp or vertical tangent) there is no tangent line of the form y = mx + b.

a
x-coordinate of the point of tangency
f(a)
y-coordinate of the point on the curve
f′(a)
Slope of the tangent line (the derivative at a)
b
y-intercept of the tangent, f(a) − f′(a)·a

Worked examples

Cubic at x = 2

f(2) = 8 − 4 + 1 = 5 and f′(x) = 3x² − 2, so f′(2) = 10. The tangent is y − 5 = 10(x − 2), i.e. y = 10x − 15. The normal has slope −1/10 and is y = −0.1x + 5.2.

Square root at x = 4

f(4) = 2 and f′(x) = 1/(2√x) gives f′(4) = 1/4. The tangent is y = 0.25x + 1, a handy linear approximation: √4.1 ≈ 0.25 × 4.1 + 1 = 2.025 (true value 2.0248). The normal has slope −4: y = −4x + 18.

Horizontal tangent at a minimum

f′(x) = 2x − 4 is zero at x = 2, where f(2) = 3. The tangent is the horizontal line y = 3 at the vertex, and the normal is the vertical line x = 2.

Exponential at x = 0

eˣ is its own derivative, so at x = 0 both the value and slope equal 1. The tangent is y = x + 1, which is why eˣ ≈ 1 + x for small x.

Frequently asked questions

How do you find the equation of a tangent line?+

Find the derivative f′(x), evaluate it at the point x = a to get the slope m, evaluate f(a) to get the point, then use point-slope form y − f(a) = m(x − a). Expand to y = mx + b if needed.

What is a normal line?+

The normal line at a point on a curve is the line through that point perpendicular to the tangent. Its slope is the negative reciprocal of the tangent slope, −1/f′(a). If the tangent is horizontal, the normal is vertical.

When does a curve have a horizontal tangent?+

A horizontal tangent occurs where f′(x) = 0. These points are critical points — they may be local maxima, local minima, or flat inflection points such as x = 0 on y = x³.

Can a tangent line cross the curve?+

Yes. A tangent only has to touch the curve and match its slope at the point of tangency. It can cross the curve at an inflection point (y = x³ at 0) and can intersect the curve again elsewhere.

What is linear approximation?+

Linear approximation uses the tangent line to estimate function values near a: f(x) ≈ f(a) + f′(a)(x − a). For example, √4.1 ≈ 2 + 0.25 × 0.1 = 2.025, very close to the true 2.02485.

Related tools