Tangent Line Calculator (Free, with Graph)

CalculusFreeNo sign-up

The tangent line to y = f(x) at x = a is y − f(a) = f′(a)(x − a). For f(x) = x² at x = 3, the point is (3, 9) and the slope is f′(3) = 6, so the tangent line is y = 6x − 9. The tangent line calculator below also handles implicit and parametric curves, with the normal line, steps and a graph.

Tangent line calculator: what kind of curve?
Reads asReads asf(x) = x3 − 3x2 + 2
Type x^3 for x³, 2x for 2·x, sqrt(x), e^x, ln(x), sin(x). The point can be exact: pi/4, sqrt(2), 1/3.
Try:
Tangent line at (1, 0)
Tangent:y = −3x + 3
Point of tangency(1, 0)
Slope m = f′(1)−3
Point-slope formy = −3(x − 1)
Normal liney = x/3 − 1/3
Normal slope −1/m1/3
Angle with the x-axis108.43°
f′(x)3x2 − 6x
−2−11234−2−112(1, 0)
y = x³ − 3x² + 2tangent: y = −3x + 3normal: y = x/3 − 1/3
Show steps (10 steps)
  1. Find the pointSubstitute x = 1 into f: f(1) = 0. The point of tangency is (1, 0).
  2. Differentiate f(x) = x³ − 3x² + 2
  3. Sum and difference ruled/dx[x3 − 3x2 + 2] = d/dx[x3] − d/dx[3x2] + d/dx[2]
  4. Power ruled/dx[x3] = 3·x2 = 3x2
  5. Constant multiple and power ruled/dx[3x2] = 3·2·x = 6x
  6. Constant ruled/dx[2] = 0
  7. Resultf′(x) = 3x2 − 6x
  8. Slope at the pointm = f′(1) = −3
  9. Point-slope formy − y₁ = m(x − x₁) with (x₁, y₁) = (1, 0) and m = −3: y = −3(x − 1)
  10. Slope-intercept formDistribute and solve for y: y = −3x + 3. The y-intercept is b = y₁ − m·x₁ = 3.
  11. Normal lineThe normal line is perpendicular to the tangent, so its slope is −1/m = 1/3. Point-slope form: y = (1/3)(x − 1), or y = x/3 − 1/3.

Next: derivative with every rule · point-slope form calculator · where is the tangent horizontal?

Tangent Line Calculator (Free, with Graph)
Embed this calculator on your site

Free to use on class pages, blogs and course pages. Copy the code below and paste it into your page:

How to use the tangent line calculator

  1. Pick the type of curve. Use y = f(x) for an ordinary function, Implicit for an equation such as x² + y² = 25, or Parametric for a curve given by x(t) and y(t).
  2. Type the function or equation. Write x^2 for x², 3x for 3·x, sqrt(x), e^x, ln(x) and sin(x). The “Reads as” line shows how your input was understood.
  3. Enter the point: x = a for a function, (x₀, y₀) for an implicit curve, or t₀ for a parametric curve. Exact values such as pi/6 or sqrt(2) are kept exact.
  4. Read the tangent line in slope-intercept form, the point-slope form, the normal line, the slope and the angle the line makes with the x-axis. Open Show steps to see every derivative rule used.

Tangent line formula

A tangent line touches a curve at one point and has the same slope as the curve there. Two facts fix the line: the point (a, f(a)) and the slope m = f′(a). Put them into the point-slope form of a line:

y − f(a) = f′(a)(x − a)

Here a is the x-coordinate of the point of tangency, f(a) is its y-coordinate and f′(a) is the derivative evaluated at a. Distribute and solve for y to get the slope-intercept form y = mx + b, where b = f(a) − m·a.

The normal line passes through the same point but is perpendicular to the tangent, so its slope is −1/m. If the tangent is horizontal (m = 0), the normal line is the vertical line x = a.

How to find the equation of a tangent line

  1. Find the point. Substitute a into the function: y₁ = f(a).
  2. Find the slope. Differentiate f, then substitute a: m = f′(a). The derivative calculator shows this part rule by rule.
  3. Write the line. Use y − y₁ = m(x − a), then simplify to y = mx + b if your teacher wants that form.

Worked examples

Example 1: a polynomial, with the normal line

Find the tangent and normal lines to f(x) = x² at x = 3. The point is f(3) = 9, so (3, 9). The derivative is f′(x) = 2x, so the slope is f′(3) = 6. Point-slope form: y − 9 = 6(x − 3), which simplifies to y = 6x − 9. The normal slope is −1/6, so the normal line is y − 9 = −(1/6)(x − 3), or y = −x/6 + 19/2.

Example 2: a square root and linear approximation

For f(x) = √x at x = 4, the point is (4, 2). Since f′(x) = 1/(2√x), the slope is f′(4) = 1/4. The tangent line is y − 2 = (1/4)(x − 4), or y = x/4 + 1. Near x = 4 the tangent line stays close to the curve, so it gives a quick estimate: √4.1 ≈ 4.1/4 + 1 = 2.025. The true value is about 2.02485, so the error is only about 0.00015. Using a tangent line this way is called linear approximation.

Example 3: an implicit curve (a circle)

Find the tangent to x² + y² = 25 at (3, 4). Differentiate both sides with respect to x, treating y as a function of x: 2x + 2y·(dy/dx) = 0, so dy/dx = −x/y. At (3, 4) the slope is −3/4. The tangent line is y − 4 = −(3/4)(x − 3), or y = −3x/4 + 25/4. The normal line has slope 4/3 and passes through the origin: y = 4x/3, which is the radius. A tangent to a circle is always perpendicular to the radius at that point.

Example 4: a parametric curve

For x = t², y = t³ − 3t at t = 2, the point is (4, 2). Here dx/dt = 2t = 4 and dy/dt = 3t² − 3 = 9, so dy/dx = (dy/dt)/(dx/dt) = 9/4. The tangent line is y − 2 = (9/4)(x − 4), or y = 9x/4 − 7.

Horizontal and vertical tangent lines

Situation What happens Example
f′(a) = 0 Horizontal tangent y = f(a); vertical normal x = a x² − 4x + 1 at x = 2: y = −3
Slope grows without bound Vertical tangent x = a ∛x at x = 0: x = 0
Implicit, Fy = 0 Vertical tangent x² + y² = 25 at (5, 0): x = 5
Parametric, dx/dt = 0 Vertical tangent x = cos t, y = sin t at t = 0: x = 1
Parametric, dy/dt = 0 Horizontal tangent x = t², y = t³ − 3t at t = 1: y = −2
Corner or cusp No tangent line |x| at x = 0 (slopes −1 and 1)

To find every point where a function has a horizontal tangent, solve f′(x) = 0. The critical points calculator does that and classifies each point.

Common tangent line mistakes

Mistake How to catch it
Using f′(x) as the slope without substituting a The slope of a line is a number. If your “slope” still has x in it, substitute the point.
Using f′(a) as the y-coordinate The point is (a, f(a)), from the original function. The derivative only gives the slope.
Sign errors in x − a At a = −2 the factor is x + 2. Check that the line passes through the point by substituting it.
Normal slope written as 1/m The normal slope is −1/m. The product of the two slopes must be −1.
Rounding too early Keep exact values such as π/4 or √3/2 until the last step, as the calculator does.

A quick self-check: plug x = a into your final line. You must get f(a). Then compare with the graph; the line should touch the curve at the point and run along it nearby.

Homework tips

Work the problem by hand first, then enter it here and compare line by line. If the answers differ, open the steps and find the first line where your work and the calculator disagree; that is usually a derivative rule or a sign. Teachers often accept either form, but some ask for point-slope form because it shows the point and slope directly, so the calculator gives both.

Tangent Lines practice quiz: 10 questions

Test yourself with 10 multiple-choice questions. Choose an answer and press Submit to see if you are right and why. Your score appears at the end.

Question 1 of 10
1. What is the tangent line to y = x² at x = 2?

Found a mistake? Let us know!

2. What is the slope of the tangent line to f(x) = x³ − 5x at x = 2?

Found a mistake? Let us know!

3. The tangent line at a point has slope 4. What is the slope of the normal line?

Found a mistake? Let us know!

4. What is the tangent line to y = eˣ at x = 0?

Found a mistake? Let us know!

5. At which x does f(x) = x² − 6x + 1 have a horizontal tangent line?

Found a mistake? Let us know!

6. For the circle x² + y² = 10, what is the slope of the tangent line at (1, 3)?

Found a mistake? Let us know!

7. For the parametric curve x = t², y = 4t, what is dy/dx at t = 1?

Found a mistake? Let us know!

8. What is the tangent line to y = 1/x at x = 1?

Found a mistake? Let us know!

9. Use the tangent line to y = √x at x = 9 to estimate √9.2.

Found a mistake? Let us know!

10. What is the tangent line to y = sin x at x = 0?

Found a mistake? Let us know!

Frequently asked questions

What is the equation of a tangent line?

It is y − f(a) = f′(a)(x − a), the point-slope form with the point (a, f(a)) and slope f′(a). For f(x) = x² at x = 3 this gives y − 9 = 6(x − 3), which is y = 6x − 9.

What is a tangent line in calculus?

It is the line that touches a curve at one point and has the same slope as the curve there. Its slope is the derivative at that point, and near the point it is the best straight-line approximation of the curve.

How do you find the slope of a tangent line?

Take the derivative and substitute the x-value. For f(x) = x³ − 2x, f′(x) = 3x² − 2, so the slope at x = 1 is 1. Without derivative rules, you can estimate it with a difference quotient [f(1 + h) − f(1)]/h for a small h; the difference quotient calculator shows how that limit becomes the derivative.

Can a tangent line cross the curve?

Yes. A tangent line touches the curve at the point of tangency, but it may cross the curve there or elsewhere. For f(x) = x³ − 3x² + 2 at x = 1, an inflection point, the tangent y = −3x + 3 passes from one side of the curve to the other.

How do you find the tangent line on a graphing calculator?

On a TI-84, graph the function, press 2nd PRGM to open the DRAW menu, choose Tangent(, type the x-value and press ENTER. The calculator draws the line and prints its equation with rounded decimals, so work out the exact slope by hand or with the tool above if you need an exact answer.

Related calculators

More calculus calculators

Browse all 458 calculators

Related to This Article

What people say about "Tangent Line Calculator With Graph and Steps (Free)"?

No one replied yet.

Leave a Reply