Tangent Line Calculator
Find the tangent line to any function at a point — slope, intercept, and equation instantly.
How it works
- 1Enter any expression for f(x) — polynomials, trig, logarithms, and more are supported.
- 2Set the point x = a; the calculator evaluates f(a) and the derivative f ′(a) numerically.
- 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.
Related tools
See all →Calculate the area and perimeter of a rectangle from its width and height, with a labeled diagram.
Calculate the area and circumference of a circle from its radius, with a labeled diagram.
Calculate the area (Heron’s formula) and perimeter of a triangle from its three sides.
Calculate the area and perimeter of a trapezoid from its two parallel sides, height, and legs.