Skip to content
math

Tangent Line Calculator

Find the tangent line to any function at a point — slope, intercept, and equation instantly.

Slope f′(a)
2
Point (a, f(a))
(1, 1)
Tangent line
y = 2x + -1
The tangent line touches the curve at x = a with slope equal to the derivative f′(a) there.

How it works

  1. 1Enter any expression for f(x) — polynomials, trig, logarithms, and more are supported.
  2. 2Set the point x = a; the calculator evaluates f(a) and the derivative f ′(a) numerically.
  3. 3The tangent line y = f ′(a)·x + (f(a) − f ′(a)·a) is shown with its slope and point of tangency.

Use cases

  • Checking hand-computed derivatives by comparing the numeric slope with your analytical answer.
  • Visualising linear approximations — the tangent line is the best local linear model of f near x = a.
  • Setting up Newton–Raphson iterations by reading the x-intercept of successive tangent lines.

Frequently asked questions

How is the derivative estimated?

A central-difference formula, (f(a + h) − f(a − h)) ÷ 2h with a tiny h, gives accuracy to several significant figures for smooth functions.

What functions can I use in f(x)?

Standard operators (+, −, ×, ÷, ^), constants (pi, e), and functions sin, cos, tan, asin, acos, atan, sqrt, cbrt, abs, exp, ln, log. The only variable is x.

Why does the equation read “+ −…” sometimes?

The line is written as y = mx + b; when the intercept b is negative the display naturally shows “+ −…”, which is arithmetically correct slope-intercept form.

See all →