UTILS.
Private by default
📈

Tangent & Normal Line Calculator

Find the tangent line to y=f(x) at x=a and the perpendicular normal line, with slope, point of tangency, and equations in slope-intercept and point-slope form.

Your files stay on this device

Files are processed in your browser, never uploaded. The site downloads code and assets to run the tools. No accounts or trackers.

Use Download to save this tool as one HTML file for offline use.

Privacy →

Enter f(x) using x as the variable and the point of tangency a.

About this tool

The Tangent & Normal Line Calculator is a free, in-browser tool that finds the straight line touching the curve y = f(x) at a chosen point x = a. The slope of that tangent is the derivative m = f′(a), and the line passes through the point (a, f(a)), giving the equation y = m(x − a) + f(a). The calculator differentiates numerically, so you can enter any function of x — polynomials, roots, trig, exponentials, logarithms — without working out the derivative by hand.

Everything is computed locally in your browser and nothing you type is sent anywhere. Enter the function using x as the variable (for example x^2, sin(x), or ln(x)) and the point of tangency a, and the tool reports the slope, the point (a, f(a)), and the tangent line in both slope-intercept form y = m·x + c and point-slope form. It also gives the normal line — the line through the same point but perpendicular to the tangent, with slope −1/m — handling the special cases where the tangent is horizontal (m = 0), in which the normal is the vertical line x = a.

The tangent line is the best straight-line approximation to a curve near a point, which is why it underlies linearization, Newton's method, and the very definition of the derivative. For y = x² at a = 2 the slope is f′(2) = 4 and the point is (2, 4), so the tangent is y = 4x − 4 and the normal is y = −0.25x + 4.5.

Frequently asked questions

How do you find the equation of a tangent line?
Compute the slope m = f′(a) (the derivative at the point) and the point (a, f(a)). The tangent is y = m(x − a) + f(a), which rearranges to slope-intercept form y = m·x + (f(a) − m·a). This calculator does both automatically.
What is the normal line?
The normal line is perpendicular to the tangent at the same point, so its slope is −1/m where m = f′(a). If the tangent is horizontal (m = 0) the normal is the vertical line x = a; if the tangent is vertical the normal is horizontal.
How is the slope calculated?
The derivative f′(a) is evaluated numerically using a symmetric difference (f(a+h) − f(a−h)) / (2h) with a tiny h. That lets you enter any function of x without supplying its derivative, and it is accurate to many significant figures for smooth functions.
What is the tangent to y = x² at x = 2?
The derivative is 2x, so the slope at x = 2 is 4, and the point is (2, 4). The tangent line is y = 4x − 4, and the perpendicular normal line is y = −0.25x + 4.5.

More tools