Tangent Line Calculator

The tangent line touches a curve at one point and has the same slope there. For f(x) = x² at x₀ = 3, the point is (3, 9), the slope is f′(3) = 6, and the tangent line is y = 6x − 9. The normal line, perpendicular to it, is y = −x/6 + 9.5.

Last updated · By · Runs in your browser, nothing is uploaded

Result

Step-by-Step Solution

Enter your values above to see the full working.

What Is a Tangent Line?

A tangent line to a curve at a point is the straight line that just touches the curve there and has exactly the same direction as the curve at that point. Zoom in far enough on any smooth curve and it looks like its tangent line, which is why the tangent is the best straight-line approximation of the function near that point.

The slope of the tangent line is the derivative f′(x₀). So finding a tangent line combines two ideas you already know: the derivative gives the slope, and a point and a slope give a line, as in point-slope form. The normal line is the line perpendicular to the tangent at the same point.

Tangent vs Normal

Tangent lineNormal line
DirectionSame as the curvePerpendicular to the curve
Slopef′(x₀)−1 ÷ f′(x₀)
For x² at x₀ = 3slope 6slope −1/6
Equationy = 6x − 9y = −x/6 + 9.5

Tangent Line Formula

Tangent: y − f(x₀) = f′(x₀)(x − x₀) Normal: y − f(x₀) = −1 ÷ f′(x₀) · (x − x₀)
  • x₀ is the x-coordinate of the point of tangency.
  • f(x₀) is the y-coordinate of that point.
  • f′(x₀) is the slope of the curve there, found by differentiating. See the power rule derivative calculator.
  • If f′(x₀) = 0, the tangent is horizontal, y = f(x₀), and the normal is vertical, x = x₀.

How Is It Calculated? Worked Examples

f(x) = x² at x₀ = 3

  1. Point: f(3) = 9, so the point is (3, 9).
  2. Slope: f′(x) = 2x, so f′(3) = 6.
  3. Tangent line: y − 9 = 6(x − 3), which gives y = 6x − 9.
  4. Normal line: slope −1/6, so y − 9 = −(1/6)(x − 3), giving y = −0.1667x + 9.5.

A Cubic: f(x) = x³ − 6x² + 9x

x₀PointSlope f′(x₀)Tangent line
0(0, 0)9y = 9x
2(2, 2)−3y = −3x + 8
1(1, 4)0y = 4 (horizontal)

Linear Approximation

Near x = 3, the tangent y = 6x − 9 approximates x². At x = 3.1 the tangent gives 6(3.1) − 9 = 9.6, while the true value is 9.61. The closer you are to the point of tangency, the better the approximation. This is how calculators estimate square roots and other functions, and how engineers linearise nonlinear systems.

Where the Tangent Meets the Axes

The tangent y = 6x − 9 crosses the x-axis at x = 1.5 and the y-axis at y = −9.

Secant Lines Approaching the Tangent

The slope of the secant line through x = 3 and x = 3 + h on y = x² is (9 + 6h + h² − 9) ÷ h = 6 + h. As h shrinks, the slope approaches 6, the tangent slope.

h10.10.010.001
Secant slope76.16.016.001

Horizontal Tangents

For f(x) = x³ − 6x² + 9x, setting f′(x) = 3x² − 12x + 9 = 0 gives x = 1 and x = 3. The tangents there are the horizontal lines y = 4 and y = 0, at the curve’s local maximum and minimum.

How to Use This Tangent Line Calculator

  1. Type your polynomial f(x), such as x^2 or x^3 - 6x^2 + 9x.
  2. Enter the x-value x₀ where you want the tangent.
  3. Read the point of tangency, the slope, the tangent line equation and the normal line equation.
  4. Open the steps to see the derivative and the point-slope substitution.

Where Tangent Lines Are Used

  • Calculus: the geometric meaning of the derivative and the basis of linear approximation.
  • Physics: the tangent to a position-time graph gives instantaneous velocity.
  • Engineering: linearising nonlinear systems around an operating point.
  • Numerical methods: Newton’s method follows tangent lines to find roots. See the Newton’s method calculator.
  • Optics and design: the normal line defines angles of reflection and refraction.

What Are the Most Common Mistakes With the Tangent Line Calculator?

  • Using f(x₀) as the slope. The slope is f′(x₀).
  • Forgetting the point. The tangent passes through (x₀, f(x₀)), not through the origin.
  • Wrong normal slope. It is the negative reciprocal, −1 ÷ f′(x₀), not just −f′(x₀).
  • Expecting the tangent to touch only once. A tangent can cross the curve elsewhere.
  • Horizontal tangents. If f′(x₀) = 0 the normal is a vertical line and has no slope.
  • Overusing the approximation. It is only reliable close to x₀.

Where Can You Verify These Formulas?

The definitions and formulas on this page follow standard references. Check them against these sources:

Built and maintained by S. Dilshan. Found a mistake? Email [email protected] with the page address.

Frequently Asked Questions

How do you find the equation of a tangent line?

Compute the point (x₀, f(x₀)) and the slope f′(x₀), then use y − f(x₀) = f′(x₀)(x − x₀).

What is the tangent line to y = x² at x = 3?

y = 6x − 9. The point is (3, 9) and the slope is f′(3) = 6.

What is a normal line?

The line perpendicular to the tangent at the point of tangency. Its slope is the negative reciprocal of the tangent slope.

What if the slope is zero?

The tangent is horizontal, y = f(x₀), and the normal is the vertical line x = x₀.

How are tangent lines used to approximate functions?

Near x₀, f(x) ≈ f(x₀) + f′(x₀)(x − x₀). This linear approximation is accurate for points close to x₀.

Can a tangent line cross the curve?

Yes. A tangent touches the curve with matching slope at one point, but it may intersect the curve at other points too.